ipython / ipython

Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.

Home Page:https://ipython.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JupiterLab matplotlib issue

sofiakalinina33 opened this issue Β· comments

Hello πŸ‘‹

I have a problem when using JupiterLab. I am running the following code:

import numpy as np 
import matplotlib.pyplot as plt 
x = np.linspace(-10, 10, 200) 
y = np.sin(np.pi * x)/(np.pi * x) 
plt.plot(x, y) 
plt.show() 

There is no visible output and the kernel restarts itself.

I would be very gratefull for your help πŸ’Œ

Please you can supply more information about what Operating System you are using, how you installed the packages and what versions they are.

For example, the outputs of

jupyter --version

and

python -c "import matplotlib as mpl; print(mpl.__version__)" 

would be useful.

Sure πŸ˜ƒ

  1. I am using Debian GNU/Linux 11 (bullseye) OS.
  2. My Jupiter version is 5.5.0
  3. And matplotlib version is 3.8.2

OK, so you are using the Debian system packages, installed using apt install or Synaptic or similar? Usually we would recommend installing in a virtual environment using conda, virtualenv, or pyenv, etc as that gives you greater control over the versions of packages installed.

Please can you still run

jupyter --version

and paste what that gives you, as this will show the version of Python packages installed rather than the Debian package.