-
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
“Error displaying widget: model not found” with Jupyter lab #112
Comments
JupyterLab 1.0 has been released last friday and ipympl does not support it quite yet (although the master branch does). It will be updated in the next day or so. |
I thought I was going mad. What poor timing! Pip installing the master branch of ipympl didn't work for me. Still getting the same error. |
What is the error you are seeing? |
Same issue here. I've been trying over the past week (as I've been following @martinRenou's updates) but reckoned that it was a WIP bug and that I should wait until it was mostly complete to try. I installed ipympl on python 3.7.1, latest conda nodejs 11.14.0 and npm 6.7.0, with the following commands:
I then test it with %matplotlib widget
import matplotlib.pyplot as plt
plt.figure()
plt.plot([1,2,3]) I'm happy to debug more. Edit: I decided not to follow through with the full readme.md developer install instructions, since I don't want to develop it, just test the most recent version. If this is where I have gone wrong, it would be great if someone could clarify why the above doesn't work :) |
I would try in a fresh conda environment, but I have terrible internet until tomorrow. |
If you are installing a dev version, instead of
(I suggest you uninstall it with you should try from the
|
|
Here is the log: |
(I am going to be a bit on and off wifi today, catching a ferry in a few hours and then a plane during the night) |
Are you sure you are in the right directory? Is there a |
Yes, definitely right directory: $ ls
environment.yml ipympl js LICENSE matplotlib.gif RELEASE.md setup.py
examples ipympl.egg-info jupyter-matplotlib.json MANIFEST.in README.md setup.cfg |
I'm gonna suggest that we wait with debugging my case until I can make a fresh conda environment. Meanwhile, maybe @MrAnimaniac or @russkel have tried as well? |
@martinRenou is there a specific npm/nodejs version requirement? #57 suggests there was, but i suspect that is old news? |
Not that I know of, I have |
I am facing the same error as well. In order to reproduce the error, I'm simply using docker where I am installing everything via pip. Maybe this will help reproduce the error (and help fix it). Dockerfile
python_requirements.txt
I am building the docker image with: The code to test is: %matplotlib widget
import matplotlib.pyplot as plt
plt.plot([0, 1, 2]) which results in: |
If you are using |
:D I misinterpreted @SylvainCorley's comment above as the master of ipympl should work with jupyterlab 1.0, rather than the opposite. That makes sense, and probably explains the error. Does it work with the most recent non 1.0 of jupyterlab? |
You did not misinterpret Sylvain's answer. The master of ipympl works with jupyterlab 1.0. But if you use the last released version of ipympl with JupyterLab 1.0, it does not work. We need to release ipympl first. |
I am running in a pipenv on 3.7.3, I uninstalled the labextension, pip uninstalled ipympl then
|
I got all examples in https://github.com/matplotlib/jupyter-matplotlib/blob/master/examples/ipympl.ipynb working after running: jupyter labextension uninstall jupyter-matplotlib && jupyter labextension uninstall @jupyter-widgets/jupyterlab-manager && conda update -y widgetsnbextension && conda update -y nodejs && pip uninstall -y ipympl && pip install git+https://github.com/matplotlib/jupyter-matplotlib.git#egg=ipympl && conda update jupyterlab -y && jupyter labextension install @jupyter-widgets/jupyterlab-manager && jupyter labextension install jupyter-matplotlib && jupyter labextension update --all && jupyter lab build && jupyter nbextension list && jupyter labextension list From what I understand, the important combination is the master ipympl from github (0.3.1) + latest jupyterlab conda install (1.0.1). Also made sure other important packages were updated, and finally all jupyterlab extension updated and rebuilt. At last a verification that all jupyter nbextensions and labextensions were ok. |
We just release 0.3.1 with support for jupyterlab 1.0. |
I'd just like to, one, confirm that 0.3.1 fixes the issue, and two, thank everyone involved for solving this :) |
Working a treat now. I think the issue was even with the master ipympl, |
Thanks. Closing. |
I was getting the same error. Followed the steps from @ivartz above and can confirm that widgets display properly now. Thanks everyone! |
@SylvainCorlay What were the changes necessary to support JupyterLab 1.0? (edit) |
For background I had done the following:
And got issues, so I ran: |
This is still an issue with jupyter lab 1.2.2 and current jupter-matplotlib |
@jbulow it's not, you must have missed a step in the installation. Please check that you correctly followed the installation steps. Did you correctly install the JupyterLab extensions?
|
I am having the same issue. Also:
Funny thing was, I had this working... until I added a different extension (which triggered a rebuild). After which, it broke. This is running in a VM with 1GB ram. I will try upping the memory and see if that fixes the problem. (might be the minimize part of the build running out of ram - I do see swapfile use).
It seems like the gui-managed rebuild process sometimes silently fails this way during the rebuild of jupyter-matplotlib, leaving the widget javascript missing. I'll see if throwing more memory at it helps (was using the default vagrant config which was only 1GB). BTW I am bulding within a singularity image, on a vagrant managed virtualbox VM on windows. |
4GB ram seems to fix my problem with |
Since I avoid using Conda, I tried following: In my case, just worked with
which comes after installation process of
|
yes, runs fine in notebook |
Today I still have the same problem after update to Jupyter lab 3. I would appreciate for the suggestions. |
Please open another issue with your specific problem and show us the output of the requested commands when opening an issue. |
@ray-ronnaret , I ran into the same issue and I'm in the same boat as @minostauros, who prefers
Finally, ensured that all extensions are
In Summary, here's the full trail of commands:
As a bonus, I also enabled using
Note:
|
@shnaqvi You should not need to to
|
What if I need to run Jupyterlab from a different environment than my IPython kernel? Or is that not a supported use case? |
I've got the same question. I have JupyterLab installed on a common/"master" environment. I have various environments created according to the application needs and each one having its own ipykernel. I have even installed ipympl in each environment - not sure if this is necessary. When I run JupyterLab from the master environment, create a new notebook using one of the other environments and try to plot a figure, I have the same error as the OP. |
Please create a new issue on this topic, even though you get the same error :) There are 20 people getting pinged with each new comment here, and many of them do not use jupyterlab via nb_kernels. |
I followed your installation instructions on a fresh python and jupyter setup with pip but end up with “Error displaying widget: model not found” even if I try to run the provided examples under Jupyter lab.
Nevertheless, the examples run just fine with Jupyter notebook, although I didn’t separately install anything. Is this a known issue?
The text was updated successfully, but these errors were encountered: