jupyter-widgets / pythreejs

A Jupyter - Three.js bridge
https://pythreejs.readthedocs.io
Other
942 stars 188 forks source link

'jupyter nbextension install' fails #198

Closed minexew closed 6 years ago

minexew commented 6 years ago

Pythreejs installed through pip3 install pythreejs. By running a python3 prompt I verified that pythreejs can be imported. However, the command jupyter nbextension install --py --symlink --sys-prefix pythreejs fails with the following trace:

Traceback (most recent call last):
  File "/usr/bin/jupyter-nbextension", line 6, in <module>
    main()
  File "/usr/lib/python3.6/site-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/usr/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/usr/lib/python3.6/site-packages/notebook/nbextensions.py", line 988, in start
    super(NBExtensionApp, self).start()
  File "/usr/lib/python3.6/site-packages/jupyter_core/application.py", line 256, in start
    self.subapp.start()
  File "/usr/lib/python3.6/site-packages/notebook/nbextensions.py", line 716, in start
    self.install_extensions()
  File "/usr/lib/python3.6/site-packages/notebook/nbextensions.py", line 695, in install_extensions
    **kwargs
  File "/usr/lib/python3.6/site-packages/notebook/nbextensions.py", line 211, in install_nbextension_python
    m, nbexts = _get_nbextension_metadata(module)
  File "/usr/lib/python3.6/site-packages/notebook/nbextensions.py", line 1122, in _get_nbextension_metadata
    m = import_item(module)
  File "/usr/lib/python3.6/site-packages/traitlets/utils/importstring.py", line 42, in import_item
    return __import__(parts[0])
ModuleNotFoundError: No module named 'pythreejs'

Fedora 27 pythreejs (1.1.0) Python 3.6.5 python3-jupyter-client-4.4.0 python3-jupyter-core 4.3.0

SylvainCorlay commented 6 years ago

jupyter is probably installed in a different environment.

minexew commented 6 years ago

Bingo.

pythreejs installed through pip is in /usr/local/lib/python3.6/site-packages/pythreejs/__init__.py jupyter installed through dnf is in /usr/lib/python3.6/site-packages/jupyter.py

vidartf commented 6 years ago

It seems to me that this was resolved, closing. Let me know if I missed something!