安装后没有名为matplotlib的模块
我已经使用 >> pip3 install matplotlib 安装了 matplotlib。因为我使用的是最新版本的 python 3.8.0。 连PIP都更新到最新版本了
选择 import matplotlib 后,显示“No module named matplotlib”
如果我再次尝试安装会收到消息
Requirement already satisfied: matplotlib in c:\program files (x86)\python38-32\lib\site-packages (3.2.0rc1)"
C:\Users\Username>py
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32
>>> import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'matplotlib'
C:\Users\Username>pip install matplotlib
Requirement already satisfied: matplotlib in c:\program files (x86)\python38-32\lib\site-packages (3.2.0rc1)
最佳答案
尝试 pip3 install matplotlib 以便将其安装在 python3 而不是 python2 上
更新:不确定如果这是它在 Windows 上的工作方式,那么在 Linux 上肯定是这样。
关于python-3.x - matplotlib 错误 : No module named matplotlib even though it is installed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58777295/