Skip to content
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

install ipympl in the Jupyter environment #7415

Closed
bruhwiler opened this issue Jan 6, 2025 · 4 comments
Closed

install ipympl in the Jupyter environment #7415

bruhwiler opened this issue Jan 6, 2025 · 4 comments
Labels

Comments

@bruhwiler
Copy link
Member

Request from a USPAS instructor:


We're in the last stretches of preparing the upcoming USPAS in Knoxville. It really is a great relief that we can still use SIREPO for the school, it helps us a lot.

Checking our notebooks again I realized that something appears to have changed in the setup of jupyter since our last school. I think I have understood the problem, and the fix in SIREPO would only take the installation of a small additional package to get things going again. Do you think you or someone from the team could do that?

Here is the technical information:

  • Running our jupyter notebooks unchanged now results in an error: Javascript error: IPython is not defined (both on my local machines and on SIREPO).
  • The solution is simple: in the affected notebooks replace the line %matplotlib notebook by %matplotlib ipympl
  • For this to work, we need to install the ipympl package (with pip3 install ipympl). I have done that on my systems (linux and mac), and it works.

We therefore ask you to install ipympl also on the SIREPO systems.

Many thanks in advance, your help in this matter it is greatly appreciated.


@e-carlin
Copy link
Member

e-carlin commented Jan 6, 2025

ipympl is already installed.

jupyter$ pip show ipympl
Name: ipympl
Version: 0.8.0
Summary: Matplotlib Jupyter Extension
Home-page: http://matplotlib.org
Author: Matplotlib Development Team
Author-email: [email protected]
License: BSD License
Location: /home/vagrant/.pyenv/versions/3.9.15/envs/py3/lib/python3.9/site-packages
Requires: ipykernel, ipywidgets, matplotlib
Required-by: 

@cchall
Copy link
Member

cchall commented Jan 6, 2025

I think this is the same issue that's been around for a while now (radiasoft/download#515 radiasoft/jupyter_rs_radia#68). All interactive matplotlib backends are broken in our environment right now.

image
image
image

@e-carlin
Copy link
Member

e-carlin commented Jan 7, 2025

Thanks @cchall. Helped me see the fix.

@e-carlin
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants