matplotlib已经安装好了,但是不让用pyplot怎么操作,请问无法安装是什么原因,是因为我把文件夹中enve那个虚拟环境文件夹删了吗?
matplotlib已经安装好了,但是不让用pyplot怎么操作,请问无法安装是什么原因,是因为我把文件夹中enve那个虚拟环境文件夹删了吗?
收起
1.检查python安装,是不是多版本并存,pycharm指向的不是3.9.6的python
2.命令行下执行from matplotlib import pyplot as plt
如果正常说明pythcharm配置有误;
如果执行有误,uninstall 然后重新pip install
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> from matplotlib import pyplot
>>> from matplotlib import pyplot as plt
>>>
import matplotlib.pyplot as plt
报告相同问题?