[BUG] - matplotlib widget doesn't work in notebook - model not found
See original GitHub issueOS system and architecture in which you are running Nebari
GCP K8s cluster
Expected behavior
%matplotlib widget
import matplotlib.pyplot as plt
plt.plot([1,2,3], [1,2,3])
plt.show()
the above should show a plot.
Actual behavior
get an error:
Error displaying widget: model not found

How to Reproduce the problem?
-
add
ipympl
package to the defaultdashboard
conda environment -
run the following in a notebook using the default
dashboard
conda environment:%matplotlib widget import matplotlib.pyplot as plt plt.plot([1,2,3], [1,2,3]) plt.show()
Command output
%matplotlib widget
import matplotlib.pyplot as plt
plt.plot([1,2,3], [1,2,3])
plt.show()
### Versions and dependencies used.
- needed to install `ipympl` first in the `dashboard` conda environment
### Compute environment
GCP
### Integrations
conda-store
### Anything else?
_No response_
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
“Error displaying widget: model not found” with Jupyter lab #112
I followed your installation instructions on a fresh python and jupyter setup with pip but end up with “Error displaying widget: model not...
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?
It's a bit hard to tell, but there may be more information in the browser console (usually shown by pressing F12 ).
Read more >Error displaying widget; model not found: 5 Fixes
In this article, we're talking about the “Error displaying widget: model not found” problem when using Jupyter Labs in Python.
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 >
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
I added
ipympl
to the basenebari-jupyterlab
image and successfully test it locally. This also didn’t require pinning the jupyterlab version 💪Here is a PR for to get this working: https://github.com/nebari-dev/nebari-docker-images/pull/39
@dharhas I was in agreement 😃