3dmol / 3Dmol.js

WebGL accelerated JavaScript molecular graphics library
https://3dmol.org/
Other
794 stars 194 forks source link

py3Dmol is not working [BUG] #766

Closed jiywang3 closed 7 months ago

jiywang3 commented 7 months ago

Describe the bug I followed the instruction at https://pypi.org/project/py3Dmol/ to show 3D structure in Jupyter Notebook. It didn't work.

To Reproduce pip install py3Dmol jupyter labextension install jupyterlab_3dmol jupyter notebook

Then issue: import py3Dmol view = py3Dmol.view(query='pdb:1ubq') view.setStyle({'cartoon':{'color':'spectrum'}}) view

The notebook opens a space for 3D rendering. But the structure is not shown.

Expected behavior The 3D structure should show up after the command "view".

Screenshots

Desktop (please complete the following information):

Additional context

Please close your issue when you feel it has been adequately resolved

dkoes commented 7 months ago

What version of jupyterlab? I just tried with 4.0.5 without issue. You shouldn't need the extension anymore.

jiywang3 commented 7 months ago

I am still using the old setup with python 3.7 and jupyterlab 2.3. Maybe I should update both?

dkoes commented 7 months ago

With some effort, I created an environment with python 3.7 and jupyterlab 2.3 and I don't see any problems. Are you sure you have the latest version of py3Dmol?

Screenshot at 2024-02-08 08-11-34

jiywang3 commented 7 months ago

Thanks for checking. I installed py3Dmol in a new computer with Python 3.12 and pip 24, and it worked even without jupyterlab_3dmol.