close

[Solved] jupyter ModuleNotFoundError: No module named matplotlib

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error jupyter ModuleNotFoundError: No module named matplotlib in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How jupyter ModuleNotFoundError: No module named matplotlib Error Occurs?

Today I get the following error jupyter ModuleNotFoundError: No module named matplotlib in python.

How To Solve jupyter ModuleNotFoundError: No module named matplotlib Error ?

  1. How To Solve jupyter ModuleNotFoundError: No module named matplotlib Error ?

    To Solve jupyter ModuleNotFoundError: No module named matplotlib Error When using python3 version of jupyter (pip3 install jupyter), matplotlib has to be installed using pip3: pip3 install matplotlib

  2. jupyter ModuleNotFoundError: No module named matplotlib

    To Solve jupyter ModuleNotFoundError: No module named matplotlib Error When using python3 version of jupyter (pip3 install jupyter), matplotlib has to be installed using pip3: pip3 install matplotlib

Solution 1

I had the same problem after installing a Python 2.7 environment inside my Anaconda3 installation. I’m not sure which command I used to create the environment, but it actually didn’t install all the optional packages that are usually bundled with Anaconda (like matplotlib, numpy, …). But that’s not a big issue, you can easily install additional packages with pip as follows:

First, list your conda environments:

C:\Users\Felix>conda info --envs
# conda environments:
#
ipykernel_py2            D:\Anaconda\envs\ipykernel_py2
root                  *  D:\Anaconda

Next, activate your python 2 environment using source activate <env> (Linux/OSX) or activate <env> (Windows):

C:\Users\Felix>activate ipykernel_py2

(ipykernel_py2) C:\Users\Felix>

Finally, use pip to install the required packages:

(ipykernel_py2) C:\Users\Felix>pip install matplotlib
Collecting matplotlib
...
Successfully installed matplotlib-2.0.0

Hope that this helps.

Solution 2

When using python3 version of jupyter (pip3 install jupyter), matplotlib has to be installed using pip3: pip3 install matplotlib

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read