I have alredy installed matplotlib on my venv in Pycharm. I tried to run it in Jupyter Notebook and them I got noticement No module named 'matplotlib'
I also tried to run !pip install matplotlib at the first cell in my .ipynb file and then I got:
Requirement already satisfied: matplotlib in c:\users\user\pycharmprojects\ege\venv\lib\site-packages (3.8.2)
Requirement already satisfied: contourpy>=1.0.1 in c:\users\user\pycharmprojects\ege\venv\lib\site-packages (from matplotlib) (1.2.0)
Requirement already satisfied: cycler>=0.10 in c:\users\user\pycharmprojects\ege\venv\lib\site-packages (from matplotlib) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in c:\users\user\pycharmprojects\ege\venv\lib\site-packages (from matplotlib) (4.45.0)
Requirement already satisfied: kiwisolver>=1.3.1 in c:\users\user\pycharmprojects\ege\venv\lib\site-packages (from matplotlib) (1.4.5)
Requirement already satisfied: numpy<2,>=1.21 in c:\users\user\pycharmprojects\ege\venv\lib\site-packages (from matplotlib) (1.26.2)
Requirement already satisfied: packaging>=20.0 in c:\users\user\pycharmprojects\ege\venv\lib\site-packages (from matplotlib) (23.2)
Requirement already satisfied: pillow>=8 in c:\users\user\pycharmprojects\ege\venv\lib\site-packages (from matplotlib) (10.1.0)
Requirement already satisfied: pyparsing>=2.3.1 in c:\users\user\pycharmprojects\ege\venv\lib\site-packages (from matplotlib) (3.1.1)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\user\pycharmprojects\ege\venv\lib\site-packages (from matplotlib) (2.8.2)
Requirement already satisfied: six>=1.5 in c:\users\user\pycharmprojects\ege\venv\lib\site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)
after that I tried to start code at the second cell: import matplotlib.pyplot as plt
and I got this:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[5], line 1
----> 1 import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'
I also tried: pip install ipykernel
what should I try to solve this problem?
%pip install matplotlib. The magic variation was added in 2019 to ensure the install occurs in the environment where the kernel is running that backs the active notebook. The exclamation point doesn't do that and can lead to issues. See more about the modern%pip installcommand here. ...