-
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
notebook backend not working in jupyterlab #9
Comments
All you need to enable this is to import ipympl. |
Apparently, it must be done at the right time? /Users/klay6683/miniconda3/envs/stable/lib/python3.5/site-packages/matplotlib/__init__.py:1401: UserWarning: This call to matplotlib.use() has no effect
because the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
warnings.warn(_use_error_msg) |
Still doesn't work. I put |
@michaelaye I am sorry I replied from a mobile device earlier and missed that you were using jupyterlab. We will add support for jupyterlab after we release ipywidgets 6.0. |
Could someone edit the title to "Notebook backend not working"? |
Confirmed that it is still broken in the latest release, 0.21.0. Will try to look at this with @tacaswell next week. |
still not working (ipywidgets 6.0.0, matplotlib 2.0.2, jupyter lab: 0.25.2, Python 3.5.3). It would be appreciated to use nbagg in jupyter lab. |
Hopefully this will get worked on at the jupytcon sprints next month. |
Hi, any news about this issue? |
This is now working (shown with pinned versions so this will always work):
%matplotlib ipympl
import matplotlib.pyplot as plt
plt.plot([0,1,1,2]) |
Thanks! |
In case others get here and are a little confused: For installation conda install notebook jupyterlab # for updating jupyter notebook and lab
pip install ipympl
jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib |
|
Are the interactivity features not yet ported? I don't see any zoom/pan etc icons? |
I tried this out the other day and was able to get mouse clicks to trigger python callbacks. |
Should this be reopened for current versions of JLab? I followed @blink1073's instructions above to the letter, with jlab 0.28.11 and ipympl 0.0.8, and it works perfectly. However, with the current version of JLab (0.30.5) and ipympl 0.1.0, I'm getting with either |
Hi @fperez! I just tried with Jlab (0.30.5) and ipympl 0.1.0 and it "Works on My Machine". |
@jasongrout, any debug tips? |
@blink1073, thanks for the info! Knowing it works for you made me re-test with a clean, just-created conda env, and it's now fine. I was testing in an env I'd made exclusively to track jlab, but where I've upgraded jlab multiple times along the way. There must have been stale JS somewhere... This points out the fact that right now, the upgrade process is still a bit rough: even though I'm isolating jlab into its own env with basically everything from conda and only lab and its dependencies being pulled in manually (plus plugins like this one), every now and then something will break in somewhat hard-to-diagnose ways. Not complaining at all, just noting that fact so we're aware of it (or at least I keep it more in mind :) We may want to remind that anyone having weird errors along the way, just nuke even their whole env and make it fresh. It's a bit brutal as a solution, but honestly it's a lot easier than tracking down where the problem may be coming from (and with good reproducibility habits, it's actually pretty painless to nuke/recreate a known env). Thanks again much!! When the install/upgrade path for this gets smoother, it's going to be awesome for end users, in lab included. |
Great! Closing again, then. |
On my machine the setup is failing at
Already tried deleting and reinstalling the python user env, which worked for @fperez. The packages installed from pip are |
Ok, apparently |
Thanks @pwuertz, looks like we need a better check for whether npm is available. |
I'm getting the following error:
Anaconda 3; jupyter lab & nodejs installed via conda; npm & ipympl via pip. |
You'll need to use the current prerelease of jupyterlab |
I'm also having this problem - and having followed advice above can't seem to resolve it. I checked the following versions: MacOS 10.12.6 Trying to run jupyter lab triggered an instruction to rebuild jupyter lab - which I did.
|
Looking again at the above - I realised I might not have the latest version of Jupyter Lab. which upgraded Jupyter Lab to 0.31.0 Starting Jupyter Lab then asked for a rebuild - which I did. During the rebuild the following appeared in the bash script:
After reloading the Jupyter Lab page, the |
@chrisrb10 I'd try uninstalling jupyterlab with conda and installing with |
@thomasaarholt thanks - I tried that. If it is relevant - my Jupyter notebook is v.5.0.0. I have upgraded to more recent versions (5.2, 5.3) but each time I do I lose the ability to download as html (this issue) - so downgraded back to 5.0.0. |
To all wanderers, make sure to |
Use the current prerelease of jupyterlab worked for me! Thanks @jasongrout. |
I have the same problem as chrisrb10 ("KeyError")... any luck on that front? |
With the latest version of %matplotlib widget |
This gives me the same problem with the KeyError. |
Is ipympl installed? |
Yup. "Import ipympl" works with no hitches. |
What is the version of matplotlib? |
2.0.0 |
@johnmarktaylor91 You need to update You can also monkey patch in the right information. |
I updated ipykernel to the most recent version and still the same error. |
I had to install yarn to be able to run before I got: [1/4] Resolving packages... After installing yarn I ran: When reopening the terminal it ran successfully! |
Worked for me:
Then use PS : or maybe it was |
Just go through this PATH definitely it will fix your problem please let me know once you fix it |
when i try to install jupyter matplotlib using the command "conda install -c conda forge ipympl" on anaconda prompt here's the error that prompt PackagesNotFoundError: The following packages are not available from current channels:
Current channels:
To search for alternate channels that may provide the conda package you're
and use the search bar at the top of the page. |
I fear you are mixing the |
Try |
Oh, good catch! |
Ok let me try |
Thanks really helped |
thank you, for Arch it helped to install jupyterlab-widgets from the repository. |
Just a note that starting with jupyterlab v4, you should NEVER run |
I just installed this on top of my standard env, using conda-forge.
Using standard
%matplotlib nbagg
as activation command and using standard mpl plotting did not pop up any figure inside a jupyterlab notebook?Using MPL 2.0 and jupyterlab v0.16 on a Python 3.5 env with conda on OSX 10.11.6 inside Safari 10.0.3
The text was updated successfully, but these errors were encountered: