zakandrewking / escher

Build, share, and embed visualizations of metabolic pathways.
https://escher.github.io
Other
210 stars 78 forks source link

installing escher jupyter notebook extension #321

Closed glucksfall closed 5 years ago

glucksfall commented 5 years ago

Hello,

I found this error when trying to install the jupyter notebook extension

$jupyter nbextension install --py escher
Traceback (most recent call last):
  File "/shared/D1/opt/python-3.6.5/bin/jupyter-nbextension", line 11, in <module>
    sys.exit(main())
  File "/shared/D1/opt/python-3.6.5/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/shared/D1/opt/python-3.6.5/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/shared/D1/opt/python-3.6.5/lib/python3.6/site-packages/notebook/nbextensions.py", line 988, in start
    super(NBExtensionApp, self).start()
  File "/shared/D1/opt/python-3.6.5/lib/python3.6/site-packages/jupyter_core/application.py", line 255, in start
    self.subapp.start()
  File "/shared/D1/opt/python-3.6.5/lib/python3.6/site-packages/notebook/nbextensions.py", line 716, in start
    self.install_extensions()
  File "/shared/D1/opt/python-3.6.5/lib/python3.6/site-packages/notebook/nbextensions.py", line 695, in install_extensions
    **kwargs
  File "/shared/D1/opt/python-3.6.5/lib/python3.6/site-packages/notebook/nbextensions.py", line 211, in install_nbextension_python
    m, nbexts = _get_nbextension_metadata(module)
  File "/shared/D1/opt/python-3.6.5/lib/python3.6/site-packages/notebook/nbextensions.py", line 1125, in _get_nbextension_metadata
    'it is missing the `_jupyter_nbextension_paths()` method.'.format(module))
KeyError: 'The Python module escher is not a valid nbextension, it is missing the `_jupyter_nbextension_paths()` method.'

It seems doesn't impact escher usability (I thought I couldn't see anything when called the Builder, but I forgot to add the display_in_notebook() at the end)

zakandrewking commented 5 years ago

Can you share the jupyter notebook and escher versions you are using?

pip list|grep notebook pip list|grep escher

glucksfall commented 5 years ago

notebook version 6.0.0 and escher version 1.6.0

glucksfall commented 5 years ago

PS: it is installed as Escher

zakandrewking commented 5 years ago

You'll need the latest Escher version - try 1.7.3

glucksfall commented 5 years ago

Yes, that solved the issue. Thank you