nglview widget not working

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.

Moderators: Global Moderator, Moderator

Post Reply
Message
Author
ryan_odell1
Newbie
Newbie
Posts: 2
Joined: Mon Apr 03, 2023 2:11 pm

nglview widget not working

#1 Post by ryan_odell1 » Mon Oct 23, 2023 4:36 pm

I am using vasp.6.4.2 on an ubuntu 22.04.3 LTS machine. I am not able to view structures from py4vasp using the jupyter lab tutorial. I installed py4vasp using pip install and I'm using python 3.10.12. I get the error "Error displaying widget" after using my_calc.structure.print(). I can plot DOS data but not the structures. I've tried to revert versions of ipywidgets to 7.7.0 but i've not been able to resolve the issue.

Selected Jupyter core packages...
IPython : 8.15.0
ipykernel : 6.25.2
ipywidgets : 7.7.0
jupyter_client : 8.3.1
jupyter_core : 5.3.2
jupyter_server : 2.7.3
jupyterlab : 4.0.7
nbclient : 0.8.0
nbconvert : 7.8.0
nbformat : 5.9.2
notebook : 7.0.6
qtconsole : 5.4.4
traitlets : 5.10.1

svijay
Global Moderator
Global Moderator
Posts: 28
Joined: Fri Aug 04, 2023 11:07 am

Re: nglview widget not working

#2 Post by svijay » Tue Oct 24, 2023 12:32 pm

Thanks for your question - we are aware of this issue (see forum/viewtopic.php?f=2&t=19199 for further details), a quick fix for this problem could be downgrading the version of notebook:

Code: Select all

pip install "notebook<7"

ryan_odell1
Newbie
Newbie
Posts: 2
Joined: Mon Apr 03, 2023 2:11 pm

Re: nglview widget not working

#3 Post by ryan_odell1 » Wed Oct 25, 2023 6:02 pm

I used pip install "notbook<7" and then opened the training with jupyter notebook instead of jupyter lab which then properly displayed the widget. I can't recall if i opened things in notebook before to test whether or not both didn't work but i'm able to view the 3D figures in jupyter notebook now. The widget still does not work when the training is opened using "jupyter lab".

svijay
Global Moderator
Global Moderator
Posts: 28
Joined: Fri Aug 04, 2023 11:07 am

Re: nglview widget not working

#4 Post by svijay » Mon Oct 30, 2023 12:53 pm

To fix the issue on jupyter lab, one option is to try downgrading jupyter lab as well.

Code: Select all

pip install "jupyterlab<4"

Post Reply