Jupyter notebook: Widget Javascript not detected

I used the following commands successfully with Jupyter, Mac OS, Python 3.6, and Anaconda. The first command gets the latest version of ipywidgets at this time (version 7.0).

conda install -c conda-forge ipywidgets

jupyter nbextension enable --py widgetsnbextension

I faced the same problem and after running the command:jupyter nbextension enable --py --sys-prefix widgetsnbextension, the prompt should appear:

>Enabling notebook extension jupyter-js-widgets/extension...

- Validating: ok. Refresh your jupyter notebook and the widgets worked.


The answer from chjortlund did not work for me because I don't have root rights. This solved it for me:

pip3 install --upgrade ipywidgets
jupyter nbextension enable --py widgetsnbextension

Run the following command: jupyter nbextension enable --py --sys-prefix widgetsnbextension, then restart the kernel in Jupyter should do the trick.