No module named 'matplotlib.pyplot'; 'matplotlib' is not a package

前端 未结 5 1227
刺人心
刺人心 2021-01-13 08:25

Have found a similar issue, however haven\'t found proper solution.

Here\'s a code:

import matplotlib.pyplot as plt
plt.plot([1,2,3],[4,2,5])
plt.sh         


        
5条回答
  •  春和景丽
    2021-01-13 09:06

    If you are using pycharm and have matplotlib.py in your current working directory than you get this error. Just delete or rename the matplotlib.py file and it will work.

提交回复
热议问题