No module named matplotlib.pyplot


After installing the matplotlib in cmd by using command:

pip install matplot 

and then coding in

import matplotlib.pyplot as plt
bla bla bla 
bla bla bla

it returns error: No module named matplotlib.pyplot


I created a new project named matplotlib in Pycharm. Open this project in Pycharm, turn to the Terminal and type:

pip install matplot 

then, the import command works without errors.

I don’t fully understand the reason why this happen, one thing for sure is in the former example, matplotlib can not be imported into our working project correctly. So if you have this problem, you`d better install matplotlib in your current/new project by using the Terminal of you IDE.



“ No module named matplotlib.pyplot ” comments 0


电子邮件地址不会被公开。 必填项已用*标注