-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to load model class 'MPLCanvasModel' from module 'jupyter-matplotlib' #460
Comments
Hi @dbl001 it looks as though you have the newest labextension but not the latest python version. Can you please update the python version: |
Ok. There's also weird behavior where if the matplotlib works then all the other widgets output text instead of displaying properly.
The behavior appears to be either matplotlib works or the other widgets work. |
|
This looks like the the widgets version 8 manager. Currentl ipympl requires |
|
... one additional problem ...
|
That looks like the title is getting cut off from the matplotlib figure. That's related to how matplotlib renders rather than ipympl. You can probably fix it by resizing or using either |
If #461 passes then I'll make a new release that will work with ipywidgets 8. |
I get these errors with ipywidgets==7.7.0
Here my configuration:
|
1 similar comment
I get these errors with ipywidgets==7.7.0
Here my configuration:
|
Any updates on getting ipywidgets : 8.0.0rc0 with matplotlib |
Even if using ipywidgets 7.7, if you still have I would suggest starting again from a clean environment and installing latest ipympl with ipywidgets 7.7.
ipywidgets 8 is coming very soon, we'll make sure to update ipympl to have ipywidgets 8 support soonish after the ipywidgets release. |
Can you send me the output of on an environment where ipywidgets + matplotlib is working:
|
|
Here's a test:
And for matplotlib:
|
I'm still experiencing this issue with ipywidgets 8.0.1 and ipympl 0.9.2, which is the latest release and includes gh-461. Should I open a new one, or continue the conversation here?
This uses |
I am experiencing a very similar issue: In a new environment with %matplotlib ipympl
from matplotlib import pyplot as plt
fig, ax = plt.subplots() A different extension needed an update though and that triggered a Jupyterlab build. After the build finished without errors the same example only yields the error message in the cell output:
This seems to indicate that something is still not working in the built process. This reminds me of similar issues in the past where in a new environment everything worked but for unclear reasons after an update it became impossible to recover. A workaround seems to be the complete cycle of |
Can you provide more context on this? Also can you give us the output of |
@martinRenou: Thank you for looking into this! The output of
As you can see the The
|
I don't see any obvious issue here. Can you make sure to hard refresh your browser page ( |
I tried a hard refresh as you suggested, also a different browser (Chrome and Edge), and restarted JupyterLab but the issue remains. |
I experienced a similar issue and was able to fix it by manually installing the lab extension like in https://github.com/matplotlib/ipympl#use-in-jupyterlab. |
Also getting this Javascript error with Jupyer Lab 3.5.1 (using the example notebook from this repo). Should this issue be reopened and looked at again? Console error: Error: No version of module jupyter-matplotlib is registered Package Version anyio 3.6.2 |
The error only occurs in Jupyterlab, not when using Jupyter notebook. Any idea how to force github to open in jupyter notebook instead of jupyterlab? |
I also have trouble with it. Using JupyterLab v3.5.2, Console Error |
So now its working for me (Ubuntu 20.04). I am not sure what was wrong, although I had Restart jupyterlab from termial and if your didnt close your jupyter-lab tab, do a hard reload (Shift + Ctrl + r). |
I am experiencing the same issue. Specifically, using ipywidgets 7.7.2 and ipympl 0.9.2 with jupyterlab 3.5.2, if I try to plot in a JupyterLab notebook cell after %matplotlib widget I get:
|
I had the problem mentioned by the poster but got it to work again.
Problem Description:
Attempts to fix it...
The fix....
|
My current installed package versions
|
Not sure how my jupyter got into this state, but for me what solved this once and for all was:
Hope this helps someone else! |
Thank you so much for sharing! I've been trying for a few days now to fix the interactive Jupyter plot environment issue and had absolutely no luck until I saw this solution. I am working on an Azure ML compute instance (VM). For anyone else still running into the issue, the following helped me in addition to the quoted solution:
|
Why is this issue closed? Clearly people (including myself) are still getting this problem |
I'm using %matplolib widget in vscode running on WSL and have my kernel in a virtualenv and I'm facing the same issue now |
This error message most likely happens because you have an installation issue due to:
This is not something that can be fixed on ipympl per-se, hence the issue is closed. Some things to try/check:
At this point I'm going to lock this conversation as many people are being pinged and the thread is too long, has nothing to do with the initial issue. If you have a problem, please open your own issue and fill the issue template so that we can try to help your specific case. |
Describe the issue
This example plot is failing:
Versions
The text was updated successfully, but these errors were encountered: