Notebook: Widget Javascript not detected. It may not be installed or enabled properly.

Created on 15 Aug 2017  Â·  13Comments  Â·  Source: jupyter/notebook

I have done "jupyter nbextension enable --py --sys-prefix widgetsnbextension"

restarted the notebook. restarted the computer. Still get the error message when I do:

import ipywidgets as w
w.Button()

windows 10

ipywidgets 6.0.0
jupyter 1.0.0
jupyter_client 5.0.1
jupyter_core 4.3.0

Most helpful comment

@habemus-papadum: You've got ipywidgets 6.0 and widgetsnbextension 3.0.
Try upgrading ipywidgets to 7.0, or downgrading widgetsnbextension to 2.0.

All 13 comments

Do you have widgetsnbextension installed? Have you checked the messages printed by Jupyter for more information?

I have the same error on macOS Sierra:
ipywidgets 6.0.0
jupyter 1.0.0
jupyter_client 5.0.1
jupyter_core 4.3.0

I too, have also tried "jupyter nbextension enable --py --sys-prefix widgetsnbextension"

Enabling notebook extension jupyter-js-widgets/extension... - Validating: OK

yes I have widgetsnbextension installed version 2.0.0.

there is a message from jupyter saying server_extensions is deprecated use nbserver_extensions. I changed the config file accordingly then jupyter would not start at all. So I deleted it and did
jupyter nbextension enable --py --sys-prefix widgetsnbextension
and this recreates the json file with server_extensions. But the widgets still don't work.

I downgraded to widgetsnbextension==1.2.6. I am not sure how to fix the problem, but worked for me using this version.

Downgrading did not work for me.

On 28 August 2017 at 20:10, Gerardo Durán Martín notifications@github.com
wrote:

I downgraded to widgetsnbextension==1.2.6. I am not sure how to fix the
problem, but worked for me using this version.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jupyter/notebook/issues/2764#issuecomment-325449525,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABJN6QqvN5_iacn9YE65WW-lN-WhMF5wks5scxCWgaJpZM4O3gcj
.

@gerdm: ipywidgets 6.0.0 requires widgetsnbextension 2.0.0. Could it be that you have two different Python environments, like one with Python 2 running the notebook server, and another one with Python 3 running your notebook kernel? ipywidgets must be installed in the kernel environment, the matching widgetsnbextension in the notebook server environment.

@simonm3: I thought the configuration would go into a notebook.json file. But in my hosted environment, the command line from the documentation wouldn't work anyway, for lack of permissions. So I always have to change configuration files directly.

Have you checked the installed version of notebook?

Hi -- I am having the same issues as well on Mac Sierra 10.12.6:
I installed via miniconda:
conda install jupyter_core notebook nbconvert ipykernel ipywidgets
It looks like conda properly installs and enables widgetsnbextension
(I did try manually running: jupyter nbextension enable --py --sys-prefix widgetsnbextension anyways, to no avail)

Below are my package versions. Any advice on what version I could pin to work around this would be appreciated. Thanks!

# packages in environment at /Users/nehal/.stack-notebook/conda:
#
appnope                   0.1.0                    py36_0  
asn1crypto                0.22.0                   py36_0  
bleach                    1.5.0                    py36_0  
cffi                      1.10.0                   py36_0  
conda                     4.3.27           py36hb556a21_0  
conda-env                 2.6.0                         0  
cryptography              1.8.1                    py36_0  
decorator                 4.1.2                    py36_0  
entrypoints               0.2.3                    py36_0  
html5lib                  0.999                    py36_0  
idna                      2.5                      py36_0  
ipykernel                 4.6.1                    py36_0  
ipython                   6.1.0                    py36_0  
ipython_genutils          0.2.0                    py36_0  
ipywidgets                6.0.0                    py36_0  
jedi                      0.10.2                   py36_2  
jinja2                    2.9.6                    py36_0  
jsonschema                2.6.0                    py36_0  
jupyter_client            5.1.0                    py36_0  
jupyter_core              4.3.0                    py36_0  
markupsafe                1.0                      py36_0  
mistune                   0.7.4                    py36_0  
nbconvert                 5.2.1                    py36_0  
nbformat                  4.4.0                    py36_0  
notebook                  5.0.0                    py36_0  
openssl                   1.0.2l                        0  
packaging                 16.8                     py36_0  
pandocfilters             1.4.2                    py36_0  
path.py                   10.3.1                   py36_0  
pexpect                   4.2.1                    py36_0  
pickleshare               0.7.4                    py36_0  
pip                       9.0.1                    py36_1  
prompt_toolkit            1.0.15                   py36_0  
ptyprocess                0.5.2                    py36_0  
pycosat                   0.6.2                    py36_0  
pycparser                 2.17                     py36_0  
pygments                  2.2.0                    py36_0  
pyopenssl                 17.0.0                   py36_0  
pyparsing                 2.1.4                    py36_0  
python                    3.6.1                         2  
python-dateutil           2.6.1                    py36_0  
pyzmq                     16.0.2                   py36_0  
readline                  6.2                           2  
requests                  2.14.2                   py36_0  
ruamel_yaml               0.11.14                  py36_1  
setuptools                27.2.0                   py36_0  
simplegeneric             0.8.1                    py36_1  
six                       1.10.0                   py36_0  
sqlite                    3.13.0                        0  
terminado                 0.6                      py36_0  
testpath                  0.3.1                    py36_0  
tk                        8.5.18                        0  
tornado                   4.5.2                    py36_0  
traitlets                 4.3.2                    py36_0  
wcwidth                   0.1.7                    py36_0  
wheel                     0.29.0                   py36_0  
widgetsnbextension        3.0.2                    py36_0  
xz                        5.2.2                         1  
yaml                      0.1.6                         0  
zlib                      1.2.8                         3  

@habemus-papadum: You've got ipywidgets 6.0 and widgetsnbextension 3.0.
Try upgrading ipywidgets to 7.0, or downgrading widgetsnbextension to 2.0.

pinning widgetsnbextension=2 solved the issue for me. I guess ipywidgets 6.0 was pushed to anaconda cloud (or whatever it is called) with too lax constraints on widgetsnbextension. Thanks very much for the quick response and help!

@habemus-papadum What do you mean by 'pinning'?

I mean explicitly specifying the package versions I want to install:
e.g. conda install --yes jupyter_core notebook nbconvert ipykernel ipywidgets=6.0 widgetsnbextension=2.0 (this is just a random invocation that worked a few months ago -- you should vet which versions you need and which packages you want to pin, and so forth)

@rolweber's suggestion of downgrading widgetsnbextension to 2.0 when using ipywidgets=6.0 resolved this issue for me too.

Was this page helpful?
0 / 5 - 0 ratings