22

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:
https://github.com/matplotlib/jupyter-matplotlib
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
  • Can you change the image to traceback as text? Commented Aug 18, 2020 at 8:36

3 Answers 3

9

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.

Sign up to request clarification or add additional context in comments.

1 Comment

The labextension list shows OK, but I still got the same error Error displaying widget: model not found.
8

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

https://github.com/plotly/plotly.py/issues/1659

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 [email protected]

1 Comment

I am still getting the error with the ipywidgets version 7.6.3
1

I also got the same error message when i first installed ipympl but it got solved automatically when I restarted the Jupyter lab.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.