import numpy as np
import matplotlib.pyplot as plt
plt.plot([1,2,3],[5,7,2])
plt.show()
报错显示:
Traceback (most recent call last):
File "E:\python_work_1\matplotlib.py", line 2, in
import matplotlib.pyplot as plt
File "E:\python_work_1\matplotlib.py", line 2, in
import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib.pyplot'
1.pip卸载matplotlib
python -m pip uninstall matplotlib
2.pip安装jupyter
python -m pip install jupyter
3.pip安装matplotlib
python -m pip install matplotlib