zmk5 / jupyter-ros2

Jupyter widget helpers for ros2, the Next-Generation of the Robot Operating System
28 stars 8 forks source link

Installation manual doesn't work #4

Open maxlein opened 4 years ago

maxlein commented 4 years ago

After installing jupyther the call to jupyter nbextension enable --py --sys-prefix ipywidgets fails.

Both on my native Ubuntu 18.04 machine and in a docker container.

root@75289eaa9696:~# jupyter nbextension enable --py --sys-prefix ipywidgets
Traceback (most recent call last):
  File "/usr/local/bin/jupyter-nbextension", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/jupyter_core/application.py", line 268, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/traitlets/config/application.py", line 664, in launch_instance
    app.start()
  File "/usr/local/lib/python3.6/dist-packages/notebook/nbextensions.py", line 983, in start
    super(NBExtensionApp, self).start()
  File "/usr/local/lib/python3.6/dist-packages/jupyter_core/application.py", line 257, in start
    self.subapp.start()
  File "/usr/local/lib/python3.6/dist-packages/notebook/nbextensions.py", line 891, in start
    self.toggle_nbextension_python(self.extra_args[0])
  File "/usr/local/lib/python3.6/dist-packages/notebook/nbextensions.py", line 867, in toggle_nbextension_python
    logger=self.log)
  File "/usr/local/lib/python3.6/dist-packages/notebook/nbextensions.py", line 478, in enable_nbextension_python
    logger=logger)
  File "/usr/local/lib/python3.6/dist-packages/notebook/nbextensions.py", line 375, in _set_nbextension_state_python
    m, nbexts = _get_nbextension_metadata(module)
  File "/usr/local/lib/python3.6/dist-packages/notebook/nbextensions.py", line 1120, in _get_nbextension_metadata
    'it is missing the `_jupyter_nbextension_paths()` method.'.format(module))
KeyError: 'The Python module ipywidgets is not a valid nbextension, it is missing the `_jupyter_nbextension_paths()` method.'

npm -v
6.9.0
node -v
v10.16.1
zmk5 commented 4 years ago

Hey I just saw this, for some reason I'm not getting notifications about these. I haven't yet experimented with it using a docker container. I did find however that

jupyter nbextension enable --py --sys-prefix ipywidgets

doesn't work as well. It did work for me, however, if I removed --sys-prefix.

guru-florida commented 4 years ago

From the top of the Jupyter Widgits github page I used this line: jupyter nbextension enable --py widgetsnbextension