ipywidgets: Widget Javascript not detected
debugging from notebook
from jupyter_core.paths import jupyter_config_path, jupyter_data_dir, jupyter_runtime_dir, jupyter_path
import jupyter_core.version
!echo !jupyter --version and --path
!jupyter --version
!jupyter --path
!echo
!echo !cat /usr/etc/jupyter/nbconfig/notebook.json
!cat /usr/etc/jupyter/nbconfig/notebook.json
!echo
!echo !ls /usr/local/share/jupyter/nbextensions/jupyter-js-widgets
!ls /usr/local/share/jupyter/nbextensions/jupyter-js-widgets
!echo
print('version:', jupyter_core.version.__version__)
for p in jupyter_config_path():
print('config:', p)
# list of directories to search for data files...
for p in jupyter_path():
print('jupyter_path:', p)
print('jupyter_data_dir:', jupyter_data_dir())
print('jupyter_runtime_dir:', jupyter_runtime_dir())
import ipywidgets as widgets
widgets.HTML(value="Hello <b>World</b>")
output
!jupyter --version and --path
4.1.0
config:
/u/s8weber/.jupyter
/usr/etc/jupyter
/usr/local/etc/jupyter
/etc/jupyter
data:
/u/s8weber/.local/share/jupyter
/usr/local/share/jupyter
/usr/share/jupyter
runtime:
/u/s8weber/.local/share/jupyter/runtime
!cat /usr/etc/jupyter/nbconfig/notebook.json
{
"load_extensions": {
"jupyter-js-widgets/extension": true
}
}
!ls /usr/local/share/jupyter/nbextensions/jupyter-js-widgets
extension.js extension.js.map
version: 4.1.0
config: /u/s8weber/.jupyter
config: /usr/etc/jupyter
config: /usr/local/etc/jupyter
config: /etc/jupyter
jupyter_path: /u/s8weber/.local/share/jupyter
jupyter_path: /usr/local/share/jupyter
jupyter_path: /usr/share/jupyter
jupyter_data_dir: /u/s8weber/.local/share/jupyter
jupyter_runtime_dir: /u/s8weber/.local/share/jupyter/runtime
** 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"
using python3 and jupyterhub… not sure what next to look at.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 49 (16 by maintainers)
I don’t know about anyone else, but I still see this message ALL THE TIME, on lots of different systems. Sometimes it goes away after running the suggested command, sometimes it doesn’t. Sometimes reinstalling ipywidgets helps, sometimes it doesn’t. Sometimes it means the widgets aren’t working, sometimes it doesn’t. Sometimes I manage to get it to go away somehow, but then it comes back the next time anything is upgraded. This message and the associated machinery is really a big pain when using ipywidgets. 😦
This issue is fixed in the upcoming 7.0 release. I hope to have a beta out by the end of the week.
It sounds like it might be your browser caching the old javascript? Creating a new notebook might be enough to fetch the new javascript instead of pulling from a local cache.
By the way, an alpha of 7.0 is out now. We’re working on getting testing and documentation in much better shape now.
@jbednar +1 for your last comment. In my case, ipywidgets work perfectly but regularly get the “Widget Javascript not detected…” message when I make call ipywidgets API for the first time in freshly opened notebook. The tools I develop are dedicated to our end-users and this is quite confusing for them.
I forgot to mention that the notebook server must be restarted after you enable the extension.
This might be it. On Jul 15, 2016 12:29 PM, “Steve Weber” notifications@github.com wrote:
In the future, a good test is to try opening the notebook in incognito mode.