Jupyter-matplotlib: Error displaying widget: model not found

I'm trying to install jupyter-matplotlib extension but can't make it work in a jupyterlab instance. Once installed by following the steps here:
I get the error when executing a simple example:
Error displaying widget: model not found
screen capture of described behaviour

Here's the output of my $ conda list for relevant packages:

ipykernel 5.1.1
ipympl 0.2.1
ipython 7.6.1
ipython_genutils 0.2.0
ipywidgets 7.5.0
jupyter_client 5.3.1
jupyter_core 4.4.0
jupyterlab 1.0.2
jupyterlab_server 1.0.0

1

2 Answers

Solved! Turned out ipywidget 7.5 breaks jupyter lab and it isaffecting other libraries too.

downgrading to 7 solved the issue for me (allthough 7 wrt 7.5 should be backward compatibile)!

Also be sure to match ipympl 0.2.1 with jupyter-matplotlib 0.3.0 labextension.jupyter labextension install jupyter-matplotlib@0.3.0

1

First you need to install:

 pip install ipywidgets conda install -c conda-forge ipympl

Then check if the following is OK:

!jupyter labextension list

You should see something like this:

JupyterLab v3.0.14
/home/jovyan/.local/share/jupyter/labextensions jupyter-leaflet v0.15.0 enabled OK jupyterlab-plotly v5.1.0 enabled OK @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)

The most important part is here:

Restart your jupyter notebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like