question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: No module named widgetsnbextension

See original GitHub issue

Getting the following error when trying to run the suggested command for loading ipywidgets

fredbox:~ fred$ jupyter nbextension enable --py widgetsnbextension
Traceback (most recent call last):
  File "/Users/fred/anaconda/bin/jupyter-nbextension", line 11, in <module>
    sys.exit(main())
  File "/Users/fred/anaconda/lib/python2.7/site-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/Users/fred/anaconda/lib/python2.7/site-packages/traitlets/config/application.py", line 596, in launch_instance
    app.start()
  File "/Users/fred/anaconda/lib/python2.7/site-packages/notebook/nbextensions.py", line 952, in start
    super(NBExtensionApp, self).start()
  File "/Users/fred/anaconda/lib/python2.7/site-packages/jupyter_core/application.py", line 256, in start
    self.subapp.start()
  File "/Users/fred/anaconda/lib/python2.7/site-packages/notebook/nbextensions.py", line 860, in start
    self.toggle_nbextension_python(self.extra_args[0])
  File "/Users/fred/anaconda/lib/python2.7/site-packages/notebook/nbextensions.py", line 836, in toggle_nbextension_python
    logger=self.log)
  File "/Users/fred/anaconda/lib/python2.7/site-packages/notebook/nbextensions.py", line 459, in enable_nbextension_python
    logger=logger)
  File "/Users/fred/anaconda/lib/python2.7/site-packages/notebook/nbextensions.py", line 374, in _set_nbextension_state_python
    m, nbexts = _get_nbextension_metadata(module)
  File "/Users/fred/anaconda/lib/python2.7/site-packages/notebook/nbextensions.py", line 1114, in _get_nbextension_metadata
    m = import_item(module)
  File "/Users/fred/anaconda/lib/python2.7/site-packages/traitlets/utils/importstring.py", line 41, in import_item
    return __import__(parts[0])
ImportError: No module named widgetsnbextension
fredbox:~ fred$ 

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jasongroutcommented, May 9, 2016

It looks like you have an older version of ipywidgets that doesn’t need the widgetsnbextension package. The widgetsnbextension package is needed in ipywidgets 5.0 or later. It also looks like conda does not yet have ipywidgets 5.x available.

What is your end goal here? If you just want to use widgets, the older version that you have installed and is available through conda should just work.

0reactions
jasongroutcommented, May 16, 2016

So you’re okay with closing this now, then?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named 'ipywidgets' error when running IPyhon ...
It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced ...
Read more >
jupyter/jupyter - Gitter
pip install ipywidgets automatically pulls in widgetsnbextension ... I keep getting error: ImportError: No module named jupyter_core.command How can I solve ...
Read more >
pythreejs k3d ... and others - Google Groups
jupyter nbextension enable --py --sys-prefix widgetsnbextension. Apparently that's the only one : ... ImportError: No module named pythreejs
Read more >
Miscellaneous questions on the usage of JupyterLite - General
Since there is no way to pre-run Python code (from what I got from open issues #461 ... I get the ModuleNotFoundError: No...
Read more >
利用插件nbextensions打造属于自己的jupyter notebook专属 ...
规范优化代码插件: Autopep8,Code prettify选择安装一个即可。 对代码折叠:Codefolding ... Please install widgetsnbextension or ipywidgets 4.0.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found