ipywidgets don't work on virtualenv
See original GitHub issueHello all,
When i start jupyter i have the next msg
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version
and nothing happen when i try use ipywidgets in my jupyter-notebook
The step I’ve been doing from the starts when i creation my virtuelenv :
~ python3 -m virtualenv jupyter-notebook
~ pip3 install jupyter
~ jupyter nbextension enable --py --sys-prefix widgetsnbextension
Enabling notebook extension jupyter-js-widgets/extension...
- Validating: OK
~ jupyter-notebook
and i have thisin stdout
[I 20:49:51.447 NotebookApp] Serving notebooks from local directory: /home/iah
[I 20:49:51.447 NotebookApp] The Jupyter Notebook is running at:
[I 20:49:51.447 NotebookApp] http://localhost:8888/
[I 20:49:51.447 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 20:49:55.116 NotebookApp] 404 GET /api/kernels/5f273170-5379-4e1f-a1e1-7e1aad4dd924/channels?session_id=dbe4008897bc4d52901320704498afe5 (127.0.0.1): Kernel does not exist: 5f273170-5379-4e1f-a1e1-7e1aad4dd924
[W 20:49:55.154 NotebookApp] 404 GET /api/kernels/5f273170-5379-4e1f-a1e1-7e1aad4dd924/channels?session_id=dbe4008897bc4d52901320704498afe5 (127.0.0.1) 55.74ms referer=None
[I 20:50:05.445 NotebookApp] Kernel started: 112db463-d31d-4e35-98d9-0db3b00fb107
[I 20:50:06.062 NotebookApp] Adapting to protocol v5.1 for kernel 112db463-d31d-4e35-98d9-0db3b00fb107
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version
and what i have in my virtualenv
~ pip freeze
backcall==0.1.0
bleach==3.0.2
decorator==4.3.0
defusedxml==0.5.0
entrypoints==0.2.3
ipykernel==5.1.0
ipython==7.1.1
ipython-genutils==0.2.0
ipywidgets==7.4.2
jedi==0.13.1
Jinja2==2.10
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.3
jupyter-console==6.0.0
jupyter-core==4.4.0
MarkupSafe==1.0
mistune==0.8.4
nbconvert==5.4.0
nbformat==4.4.0
notebook==5.7.0
pandocfilters==1.4.2
parso==0.3.1
pexpect==4.6.0
pickleshare==0.7.5
prometheus-client==0.4.2
prompt-toolkit==2.0.7
ptyprocess==0.6.0
Pygments==2.2.0
python-dateutil==2.7.5
pyzmq==17.1.2
qtconsole==4.4.2
Send2Trash==1.5.0
six==1.11.0
terminado==0.8.1
testpath==0.4.2
tornado==5.1.1
traitlets==4.3.2
wcwidth==0.1.7
webencodings==0.5.1
widgetsnbextension==3.4.2
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:30 (10 by maintainers)
Top Results From Across the Web
IPython Notebook ipywidgets does not show - Stack Overflow
I created a table with an interactive slider that allows me to toggle between different periods on my table. It was working for...
Read more >Installation — Jupyter Widgets 7.7.2 documentation
Answer: A text representation of the widget is printed if the widget control is not available. It may mean the widget JavaScript is...
Read more >Step 1: Installing Jupyter Notebook - cs.wisc.edu
If you're having trouble installing IPython notebook, look through the following fixes & try ones that seem potentially relevant. If none of the...
Read more >How To Setup Jupyter Notebook in VS Code (w/ Virtual Env ...
Step 1. Create project folder · Step 2. Create, activate & select your virtual environment · Step 3. Install ipykernel · Step 4....
Read more >Error displaying widget: model not found -- how to fix this?
Thus I then went back to version 7: > pip uninstall ipywidgets > pip install ipywidgets. Alas, now version 7 does not work...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This error is accompanied for me with a
The kernel for ___ appears to have died. It will restart automatically.
error that never resolves.Since ipywidgets nominally works in venv environments, likely this is a problem with the specific installation and older packages that had been installed, etc. My shot-in-the-dark guess is that this is a problem with the interaction between user-level and environment-level paths in Jupyter, combined with old packages being installed at the user level. We recently addressed a situation where ipywidgets installed in a venv was broken over in https://github.com/jupyter-widgets/ipywidgets/issues/3559. The solution there was to (a) delete old ipywidgets packages in ~/.local/jupyter, and (b) set the
JUPYTER_PREFER_ENV_PATH
environment variable to prefer packages installed in the environment over packages installed in the user-level directories.For whoever is having this problem: can you (a) don’t use
jupyter labextension install
- just installing recent ipywidgets versions should automatically install the JupyterLab 3 extension, and (b) checkjupyter --paths --debug
to see where Jupyter is picking up extensions, and © dojupyter labextension list
to see what versions and where the lab extension was coming from?Please be kind. I think that comment was unnecessarily sarcastic.