Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot show structure in pip version #15

Open
pikakolendo02 opened this issue Sep 6, 2022 · 12 comments
Open

Cannot show structure in pip version #15

pikakolendo02 opened this issue Sep 6, 2022 · 12 comments
Assignees

Comments

@pikakolendo02
Copy link

Hello, I use Arch Linux and I have installed JupyterLab from pip.
I installed trident-chemwidgets tried the Scatter_widget.ipynb from examples but it cannot display structures. Hovering and click "Show Structures" displayed nothing.
pip

I tried conda version with JupyterLab in conda and everything was OK.
conda

This is a list of pip list output:

Package                        Version
------------------------------ -----------
anyio                          3.6.1
argon2-cffi                    21.3.0
argon2-cffi-bindings           21.2.0
asttokens                      2.0.8
attrs                          22.1.0
Babel                          2.10.3
backcall                       0.2.0
backports.functools-lru-cache  1.6.4
beautifulsoup4                 4.11.1
black                          22.6.0
bleach                         5.0.1
brotlipy                       0.7.0
certifi                        2022.6.15
cffi                           1.15.1
charset-normalizer             2.1.1
click                          8.1.3
colorama                       0.4.5
conda                          4.14.0
conda-package-handling         1.8.1
cryptography                   37.0.4
cycler                         0.11.0
debugpy                        1.6.3
decorator                      5.1.1
defusedxml                     0.7.1
entrypoints                    0.4
executing                      1.0.0
fastjsonschema                 2.16.1
flit_core                      3.7.1
fonttools                      4.37.1
greenlet                       1.1.3
idna                           3.3
importlib-metadata             4.11.4
importlib-resources            5.9.0
ipykernel                      6.15.2
ipython                        8.4.0
ipython-genutils               0.2.0
ipywidgets                     8.0.2
isort                          5.10.1
jedi                           0.18.1
Jinja2                         3.1.2
joblib                         1.1.0
json5                          0.9.10
jsonschema                     4.15.0
jupyter                        1.0.0
jupyter_client                 7.3.5
jupyter-console                6.4.4
jupyter-core                   4.11.1
jupyter-server                 1.18.1
jupyterlab                     3.4.6
jupyterlab-code-formatter      1.5.3
jupyterlab-language-pack-zh-CN 3.4.post4
jupyterlab-pygments            0.2.2
jupyterlab_server              2.15.1
jupyterlab-widgets             3.0.3
kiwisolver                     1.4.4
lxml                           4.9.1
MarkupSafe                     2.1.1
matplotlib                     3.5.3
matplotlib-inline              0.1.6
mistune                        2.0.4
munkres                        1.1.4
mypy-extensions                0.4.3
nbclassic                      0.4.3
nbclient                       0.6.7
nbconvert                      7.0.0
nbformat                       5.4.0
nest-asyncio                   1.5.5
notebook                       6.4.12
notebook-shim                  0.1.0
numpy                          1.23.2
packaging                      21.3
pandas                         1.4.4
pandas-datareader              0.10.0
pandocfilters                  1.5.0
parso                          0.8.3
pathspec                       0.10.1
pexpect                        4.8.0
pickleshare                    0.7.5
Pillow                         9.2.0
pip                            22.2.2
pkgutil_resolve_name           1.3.10
platformdirs                   2.5.2
ply                            3.11
Pmw                            2.0.1
prometheus-client              0.14.1
prompt-toolkit                 3.0.31
psutil                         5.9.2
ptyprocess                     0.7.0
pure-eval                      0.2.2
pycairo                        1.21.0
pycosat                        0.6.3
pycparser                      2.21
Pygments                       2.13.0
pymol                          2.5.0
pyOpenSSL                      22.0.0
pyparsing                      3.0.9
PyQt5                          5.15.7
PyQt5-sip                      12.11.0
pyrsistent                     0.18.1
PySocks                        1.7.1
python-dateutil                2.8.2
pytz                           2022.2.1
pyzmq                          23.2.1
qtconsole                      5.3.2
QtPy                           2.2.0
reportlab                      3.5.68
requests                       2.28.1
ruamel-yaml-conda              0.15.80
scikit-learn                   1.1.2
scipy                          1.9.1
Send2Trash                     1.8.0
setuptools                     65.3.0
sip                            6.6.2
six                            1.16.0
sniffio                        1.3.0
soupsieve                      2.3.2.post1
SQLAlchemy                     1.4.40
stack-data                     0.5.0
terminado                      0.15.0
threadpoolctl                  3.1.0
tinycss2                       1.1.1
toml                           0.10.2
tomli                          2.0.1
toolz                          0.12.0
tornado                        6.2
tqdm                           4.64.1
traitlets                      5.3.0
trident-chemwidgets            0.2.1
typing_extensions              4.3.0
unicodedata2                   14.0.0
urllib3                        1.26.11
wcwidth                        0.2.5
webencodings                   0.5.1
websocket-client               1.4.1
wheel                          0.37.1
widgetsnbextension             4.0.3
zipp                           3.8.1

Could it be a problem of missing package?
Thank you.

@TShimko126
Copy link
Contributor

Thanks for reporting this issue @pikakolendo02! I have a suspicion that this may be related to serving the RDKit JS assets to the front end. We have some custom filesystem manipulations we perform on install and something may be strange with the pip version/Arch Linux combination. We generally test the releases on Mac and Windows, but not Arch Linux. I'll see if I can replicate your issue on Mac first, then in Docker with Arch if I can't replicate it there. I'll let you know if I have a solution for you. If there's no easy fix, we'll make sure to have Linux compatibility in our next release. In the meantime, I'd recommend sticking with the conda version if that's working. Will update here once I've had a chance to test it.

@TShimko126
Copy link
Contributor

We took a look at this bug again on Windows, MacOS, and Ubuntu and weren't able to replicate the issue: the pip installed version displayed the structures on all systems. Would it be possible for you to load the developer console and report any error messages there? Chrome and Firefox instructions here, respectively. Thanks in advance!

@pikakolendo02
Copy link
Author

pikakolendo02 commented Sep 12, 2022

Thank you for reply @TShimko126 .
pip ver:
图片
图片
(匿名) means anonymous.
conda ver:
图片
图片

I hope these could help you.

@TShimko126
Copy link
Contributor

Thanks for the screenshots, these are very helpful. I believe this is probably a permissions issue with our local assets provider. TCW needs write access to the Jupyter extension directories as well as some other files. I expect that this might not be possible if you're installing with pip globally. My thought is that conda is using a virtualenv directory with looser permissions to which TCW can write on setup.

Are you installing with pip globally or within a different vitualenv provider? Thanks!

@gilberto-md: We should add a warning if TCW doesn't have write permissions to the Jupyter target dirs on install.

@pikakolendo02
Copy link
Author

These packages are installed locally in ~/.local/lib/python3.10/site-packages

pip list --user
Package                        Version
------------------------------ -----------
anyio                          3.6.1
argon2-cffi                    21.3.0
argon2-cffi-bindings           21.2.0
Babel                          2.10.3
beautifulsoup4                 4.11.1
bleach                         5.0.1
debugpy                        1.6.3
defusedxml                     0.7.1
entrypoints                    0.4
fastjsonschema                 2.16.1
ipykernel                      6.15.2
ipython-genutils               0.2.0
ipywidgets                     8.0.2
Jinja2                         3.1.2
json5                          0.9.10
jsonschema                     4.15.0
jupyter_client                 7.3.5
jupyter-core                   4.11.1
jupyter-server                 1.18.1
jupyterlab                     3.4.6
jupyterlab-code-formatter      1.5.3
jupyterlab-language-pack-zh-CN 3.4.post4
jupyterlab-pygments            0.2.2
jupyterlab_server              2.15.1
jupyterlab-widgets             3.0.3
MarkupSafe                     2.1.1
mistune                        2.0.4
nbclassic                      0.4.3
nbclient                       0.6.7
nbconvert                      7.0.0
nbformat                       5.4.0
nest-asyncio                   1.5.5
notebook                       6.4.12
notebook-shim                  0.1.0
pandocfilters                  1.5.0
prometheus-client              0.14.1
pyrsistent                     0.18.1
pyzmq                          23.2.1
rdkit                          2022.3.5
Send2Trash                     1.8.0
sniffio                        1.3.0
soupsieve                      2.3.2.post1
terminado                      0.15.0
tinycss2                       1.1.1
tornado                        6.2
trident-chemwidgets            0.2.1
webencodings                   0.5.1
websocket-client               1.4.1
widgetsnbextension             4.0.3

@johnberroa
Copy link

Hi, I am having the same issue. I did install to global pip on a virtual Linux machine. Everything works except structure drawing from selection or the tooltip in the scatter plot. Do you know if changing permissions somewhere would help here?

@johnberroa
Copy link

johnberroa commented Mar 6, 2023

I also just installed in a venv on a Mac, same issue. Pip is installing version 0.2.1.
image

I'm using jupyter notebooks (not lab):

>> jupyter nbextension list                                                                                                                   
Known nbextensions:
  config dir: /Users/.../venv/etc/jupyter/nbconfig
    notebook section
      jupyterlab-plotly/extension  enabled 
      - Validating: OK
      trident_chemwidgets/extension  enabled 
      - Validating: OK
      jupyter-js-widgets/extension  enabled 
      - Validating: OK

@GattiMh
Copy link

GattiMh commented Apr 12, 2023

Thanks for uploading the package.
I'm on an M1 mac and I still have the problem that no interactive features of the plots are basically happening.
Any advices?

Many thanks

@TShimko126
Copy link
Contributor

Sorry for the delay here, we've been quite busy with some other projects so maintenance on the chemwidgets package has fallen a bit behind.

@johnberroa - Is it possible for you to try with the conda installation (conda install -c conda-forge trident-chemwidgets)? We seem to have better luck getting the rdkit.js assets to the right location/permissions with conda than with pip.

@GattiMh - I don't think any of the devs have an M1 mac to test the package on. Could you provide some more information regarding your browser (and if possible screenshot the console window in your browser as @johnberroa did in his message above)?

Thanks to both of you for reporting these issues. A fix will probably take a little bit since we are busy working on other tasks at the moment, but for now I'd recommend using the conda version when possible and seeing if that fixes your issues. If not, please let me know and we can bump this higher on the priority list.

@GattiMh
Copy link

GattiMh commented Apr 28, 2023

Sorry for the delay here, we've been quite busy with some other projects so maintenance on the chemwidgets package has fallen a bit behind.

@johnberroa - Is it possible for you to try with the conda installation (conda install -c conda-forge trident-chemwidgets)? We seem to have better luck getting the rdkit.js assets to the right location/permissions with conda than with pip.

@GattiMh - I don't think any of the devs have an M1 mac to test the package on. Could you provide some more information regarding your browser (and if possible screenshot the console window in your browser as @johnberroa did in his message above)?

Thanks to both of you for reporting these issues. A fix will probably take a little bit since we are busy working on other tasks at the moment, but for now I'd recommend using the conda version when possible and seeing if that fixes your issues. If not, please let me know and we can bump this higher on the priority list.

Thanks! I have sorted the problem by doing conda/mamba install nodejs

I've also done brew install node and brew install npmbut maybe this is not important and the conda will be enough

Hope that helps the others as well.

Best wishes

@enzo547
Copy link

enzo547 commented Jul 23, 2023

Same issue on Linux, can't solve it using conda install -c conda-forge trident-chemwidgets. Have you solved it? Any advice? Thanks!
image

@clccer
Copy link

clccer commented Jan 29, 2024

I have the same issue with pip installation on windows. what is going on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants