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 π
- I am using Debian GNU/Linux 11 (bullseye) OS.
- My Jupiter version is 5.5.0
- 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.