I am trying to run a jupyter notebook in a virtualenv. But when starting it and creating a simple ipywidgets
example I get the following error:
Widget Javascript not detected. It may not be installed properly. Did you enable the widgetsnbextension? If not, then run "jupyter nbextension enable --py --sys-prefix widgetsnbextension"
The example code is here:
from ipywidgets import Button, HBox
from ipywidgets import *
button = Button()
button.description = "Test"
display(button)
I have run the following commands on the terminal:
jupyter nbextension enable --py widgetsnbextension
jupyter nbextension enable --py --sys-prefix widgetsnbextension
and I have restarted the notebook anew, and also saw the similar questions here and here, but I still get the same error.
- python 2.7.12
- ipywidgets 5.2.2
- firefox 56.0
- ubuntu 16.04.3
I need to keep the ipywidgets
version in order to test something.