Hi i have a problem and i tried lots of thing but i did not solve it, can somebody help me?. I am using jupyter and i want to run some code but I am always facing this problem ModuleNotFoundError: No module named ‘matplotlib’
that means matplotlib may not be installed in the same environment as the jupyter notebook. One way to install matplotlib is to
- create a new cell in the notebook
- install using ipython magics, by in that cell typing one of the following commands.
If you use pip for installing libraries, type
%pip install matplotlib
and if you use conda, type
%conda install matplotlib
- execute the cell
- restart the kernel
Also if you’ve already tried this suggestion and it hasn’t worked, please describe everything else you’ve tried too.
if I remember correctly i tried
%pip install matplotlib and
%conda install matplotlib but now I searched in anaconda navigator matplotlib and installed it, now it works. Thank you for your help.