nglviewer / nglview

Jupyter widget to interactively view molecular structures and trajectories
http://nglviewer.org/nglview/latest/
Other
816 stars 133 forks source link

upgrade nglview so will work with ipywidgets 8 or greater? #1095

Closed scottwsides closed 8 months ago

scottwsides commented 8 months ago

This issue has been mentioned before... eg that ipywidgets needs to be between 7.7.1-8 to work (meaning that 'import nglview' will not fail). I'm worried that if this continues that it will eventually stop working in jupyterlab. Are there plans to update nglview so that it will work with updated ipywidgets and jupyterlab?

hainm commented 8 months ago

hi @scottwsides

Latest nglview already works well with lab and ipywidgets 8 (https://github.com/nglviewer/nglview/pull/1045) We made a release almost a year ago.

scottwsides commented 8 months ago

I just tested latest versions of ipywidgets, jupyterlab and nglview=3.0.8 and 'import nglview' fails (see below)

Just triple checked and w/these deps 'import nglview' fails

Screen Shot 2024-01-08 at 4 12 51 PM

I tried a couple of other >4 versions and no luck

hainm commented 8 months ago

I just tested latest versions of ipywidgets, jupyterlab and nglview=3.0.8 and 'import nglview' fails with errors about _ipython_display

Just triple checked and w/these deps 'import nglview' fails

Screen Shot 2024-01-08 at 4 12 51 PM

I tried a couple of other >4 versions and no luck

I am getting lost here. there is no __ipython_display__ error as you mentioned. If you click to show the Javascript error, what does the message say?

hainm commented 8 months ago

and what does the versions show in your notebook for nglview and ipywidgets

hainm commented 8 months ago

@scottwsides Or you can try my version here

image
ipywidgets: 8.1.1
nglview: 3.0.8
scottwsides commented 8 months ago

Ok... so nglview==3.0.4 ipywidgets==8.0.6 jupyterlab>4 does NOT work nglview==3.0.8 ipywidgets==8.1.1 jupyterlab>4 works.

Thanks for the help. I would say you should document this somewhere. cheers,

hainm commented 8 months ago

nglview==3.0.4 ipywidgets==8.0.6 jupyterlab>4 does NOT work nglview==3.0.8 ipywidgets==8.1.1 jupyterlab>4 works.

I see. I am not aware of this issue then.

I would say you should document this somewhere. cheers,

Let's document there. :D

hainm commented 8 months ago

I've updated here: https://github.com/nglviewer/nglview/blob/master/README.md#released-version

scottwsides commented 8 months ago

Thanks for the help!