"Error displaying widget" using Jupyter Lab 1.0.2
See original GitHub issuePossibly related to #124, I am trying to run a super simple example after following the installation instructions:
pip install ipympl
# If using JupyterLab
# Install nodejs: https://nodejs.org/en/download/
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyter-matplotlib
nodejs info:
$ node -v
v10.16.0
$ npm version
{ npm: '6.9.0',
...
}
Jupyter info:
$ jupyter --version
jupyter core : 4.5.0
jupyter-notebook : 6.0.0
qtconsole : not installed
ipython : 7.6.1
ipykernel : 5.1.1
jupyter client : 5.3.1
jupyter lab : 1.0.2
nbconvert : 5.5.0
ipywidgets : 7.5.0
nbformat : 4.4.0
traitlets : 4.3.2
Simple example:
# Enabling the `widget` backend.
# This requires jupyter-matplotlib a.k.a. ipympl.
# ipympl can be install via pip or conda.
%matplotlib widget
# aka import ipympl
import matplotlib.pyplot as plt
plt.plot([0, 1, 2, 2])
plt.show()
Error:
Error displaying widget
Not sure what else I need, or where a version mismatch is, any help is appreciated. Thank you!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (2 by maintainers)
Top Results From Across the Web
'Error displaying widget' on jupyterlab using jupyterhub
I am getting the "Error displaying widget" error as shown in screenshot below. The error in chrome Javascript console is as shown below....
Read more >Jupyter-matplotlib: Error displaying widget: model not found
Solved! Turned out ipywidget 7.5 breaks jupyter lab and it isaffecting other libraries too. https://github.com/plotly/plotly.py/issues/1659.
Read more >Error displaying widget: model not found -- how to fix this?
So as to use Stacked, I installed version 8: > pip uninstall ipywidgets > pip install ipywidgets==8.0.0b. But upon displaying a Stacked ...
Read more >Issue with stackview inside JupyterLab - "Error displaying widget
Hi, i just wanted to test the really cool stackview package inside a juypter notebook but encountered a problem which I could solve...
Read more >Installation — Jupyter Widgets 7.7.2 documentation
It may mean the widget JavaScript is still loading. If the message persists in the Jupyter Notebook or JupyterLab, it likely means that...
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 Free
Top 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

The above worked for me with one addition (note that I did not do this in a new fresh environment). I ended up running
$ jupyter lab buildbefore everything worked.Also a note to others that may be getting tripped up with this. I previously thought I had the latest ipympl because
conda update ipymplsaid it was already up to date. However, the version was < 0.4.0 because it was not from the conda-forge channel. Make sure to check the version number as @davidfokkema mentioned above.Finally, I’m sure everyone agrees, but this really needs to be made much more seamless. Without nice plots jupyterlab is pretty lacking.
I could get it only to work using ipympl 0.4.0 and jupyter-matplotlib 0.5.0. Curiously, updating ipympl actually downgraded my jupyter-matplotlib extension and I had to run labextension update TWICE to get it from 0.4.0 -> 0.4.1 -> 0.5.0. Strange. So, this worked for me (starting from a previous installation):
Since ipympl 0.4.0 is in conda-forge, a minimal fresh installation can be (currently) created with: