Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x matplotlib错误:没有名为matplotlib的模块,即使已安装_Python 3.x - Fatal编程技术网

Python 3.x matplotlib错误:没有名为matplotlib的模块,即使已安装

Python 3.x matplotlib错误:没有名为matplotlib的模块,即使已安装,python-3.x,Python 3.x,安装后没有名为matplotlib的模块 我已经使用>>pip3安装matplotlib安装了matplotlib。因为我使用的是最新版本的python 3.8.0。 甚至将PIP更新为最新版本 选择import matplotlib后,显示“没有名为matplotlib的模块” 而如果我再次尝试安装,则会收到一条消息 Requirement already satisfied: matplotlib in c:\program files (x86)\python38-32\lib\site-

安装后没有名为matplotlib的模块

我已经使用>>pip3安装matplotlib安装了matplotlib。因为我使用的是最新版本的python 3.8.0。 甚至将PIP更新为最新版本

选择import matplotlib后,显示“没有名为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)
已满足要求:c:\program files(x86)\python38-32\lib\site软件包(3.2.0rc1)中的matplotlib
C:\Users\Username>py
win32上的Python 3.8.0(tags/v3.8.0:fa919fd,2019年10月14日,19:21:23)[MSC v.1916 32位(英特尔)]
>>>导入matplotlib
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ModuleNotFoundError:没有名为“matplotlib”的模块
C:\Users\Username>pip安装matplotlib
已满足要求:c:\program files(x86)\python38-32\lib\site软件包(3.2.0rc1)中的matplotlib

尝试pip3安装matplotlib,使其安装在python3而不是python2上

更新:不确定它在Windows上是否是这样工作的,当然是在Linux上