Hi, when running some widgets (tried both bqplot and tqdm_notebook), I get this error message:
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"
Running the suggested enable command at the shell, I get an error message:
% jupyter nbextension enable --py --sys-prefix widgetsnbextension
Enabling notebook extension jupyter-js-widgets/extension...
- Validating: problems found:
- require? X jupyter-js-widgets/extension
I am using ipywidgets version 5.2.2
Possibly other useful information:
% jupyter nbextension list
Known nbextensions:
config dir: /Users/cpl29573/.jupyter/nbconfig
notebook section
usability/limit_output/main enabled
- Validating: OK
jupyter-js-widgets/extension enabled
- Validating: problems found:
- require? X jupyter-js-widgets/extension
usability/runtools/main enabled
- Validating: OK
usability/ruler/main enabled
- Validating: OK
usability/codefolding/main enabled
- Validating: OK
nbextensions_configurator/config_menu/main enabled
- Validating: problems found:
- require? X nbextensions_configurator/config_menu/main
usability/hide_input/main disabled
canopy/training/exercise enabled
- Validating: OK
usability/dragdrop/main enabled
- Validating: OK
usability/scratchpad/main enabled
- Validating: OK
usability/autosavetime/main enabled
- Validating: OK
canopy/catalyst enabled
- Validating: OK
usability/toc2/main enabled
- Validating: OK
styling/table_beautifier/main enabled
- Validating: OK
usability/datestamper/main enabled
- Validating: OK
usability/hide_input_all/main enabled
- Validating: OK
usability/comment-uncomment/main enabled
- Validating: OK
usability/chrome-clipboard/main disabled
tree section
nbextensions_configurator/tree_tab/main enabled
- Validating: problems found:
- require? X nbextensions_configurator/tree_tab/main
config dir: /Users/cpl29573/Library/Enthought/Canopy_64bit/User/etc/jupyter/nbconfig
notebook section
jupyter-js-widgets/extension enabled
- Validating: problems found:
- require? X jupyter-js-widgets/extension
I am using an Enthought Canopy installation on OSX.
This seems to be related to the closed issue #965.
@relativistic did you install ipywidgets from source or a canopy package?
I used a canopy package. I also tried uninstalling it that way, and using pip.
I am having the same issue, trying to install using pip (OS X, homebrew Python 2.7.11), for use with https://github.com/arose/nglview
I am getting the same:
- require? X jupyter-js-widgets/extension
error; any ideas on what might be causing it would be much appreciated!
With pip, did you do the jupyter nbextension install step?
I tried:
jupyter nbextension enable --py --sys-prefix widgetsnbextension
and
jupyter nbextension enable --py --user widgetsnbextension
and
jupyter nbextension enable --py widgetsnbextension
all of which give me the
Enabling notebook extension jupyter-js-widgets/extension...
- Validating: problems found:
- require? X jupyter-js-widgets/extension
Happy to try anything else though! 馃榿 Very confused about what the problem is, have Node and npm, when I'm next at the machine I can get the versions. Any idea what exactly that error means?
Thanks 馃槃
@harryjubb are you installing from source or from pypi?
From pypi, I could try from source.
@harryjubb - is this still an issue? If so, let's check to see if the javascript files are actually installed somewhere - can you look in your sys-prefix directory (you can find this by executing import sys; sys.prefix in python), in 'share/jupyter/nbextensions/' subdirectory and see if the jupyter-js-widgets directory is there with the javascript files?
And can you also try going into /Users/cpl29573/.jupyter/nbconfig/notebook.json and removing the line with jupyter-js-widget/extension? My guess is that since the extension is enabled at the user level, it is looking for the javascript files at the user level, but the javascript files are installed at the sys-prefix level.
@jasongrout I install using pip with --user parameters and encounter this issue too.
in my case:
I have '~/Library/Python/2.7/share/jupyter/nbextensions/jupyter-js-widgets' folder with javascript files.
but I tried this
jupyter nbextension enable --py --user widgetsnbextension
with same error.
I run
jupyter nbextension install --py widgetsnbextension --user
and
jupyter nbextension enable widgetsnbextension --user --py
en with no error.
I think that installing an extension will not overwrite an old one by default. Can you (a) delete all traces of the widgetsnbextension (both javascript files and mentions in the config files), and (b) re-install widgetsnbextension? widgetsnbextension now installs the javascript files by default into sys-prefix, so you'd just have to enable it with jupyter nbextension enable widgetsnbextension --user --sys-prefix.
Closing this issue as resolved since there was no follow-up - please post another comment if you are still having troubles getting it installed.
Hi @jasongrout , I am having the same problem as described above, i.e. the jupyter notebook extensions are not appearing in my notebooks
Could you please provide some more explicit instructions on:
(a) delete all traces of the widgetsnbextension (both javascript files and mentions in the config files)
The only two files I found in the folder for ..AppData\Local\Enthought\Canopy\edm\envs\User\share\jupyter\nbextensions\jupyter-js-widgets
were extension.js and extension.js.map
The contents of my .jupyter\nbconfig\notebook.json file is just:
{
"load_extensions": {
"canopy\\training\\exercise": true
}
}
Also, strangely, the home directory for my notebooks (and my Canopy command prompt) defaults to the directory from which I installed Canopy. Specifying a different default directory folder in Canopy/Preferences/Notebook makes no difference.
@dreme - I don't know how Canopy arranges things, so it may be good to contact Enthought. The files you point to above seem to be the files that ipywidgets installs.
In my particular situation I did not have root access, so I couldn't use the --sys-prefix option. Also only had pip.
On Ubuntu, first shut down all jupyter-related programs. I then deleted the following three folders (you might want to make some backups though...)
~/.jupyter~/.ipython~/.local/share/jupyter _(here I deleted everything except for the "kernels" subfolder)_Then, I ran the following 4 instructions:
jupyter nbextension install --user --py widgetsnbextensionjupyter nbextension install --user --py bqplotjupyter nbextension enable --user --py widgetsnbextensionjupyter nbextension enable --user --py bqplotAfter all the above and starting jupyter again, things worked as expected 馃檪
Great! Thanks for sharing your solution.
export installable_name=bqplot
jupyter nbextension install --py $installable_name --user
upyter nbextension enable $installable_name --user --py
What do I do if the share folder does not have a jupyter subdirectory? I installed both python 3.7 and jupyter via brew.
This finally worked for me
jupyter nbextension install --user --py widgetsnbextension
jupyter nbextension enable --user --py widgetsnbextension
Most helpful comment
I run
jupyter nbextension install --py widgetsnbextension --userand
jupyter nbextension enable widgetsnbextension --user --pyen with no error.