【问题标题】:matplotlib Error: No module named matplotlib even though it is installedmatplotlib 错误:没有名为 matplotlib 的模块,即使它已安装
【发布时间】:2023-03-07 12:19:01
【问题描述】:

安装后没有名为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)

【问题讨论】:

    标签: python-3.x


    【解决方案1】:

    尝试 pip3 install matplotlib 以便将其安装在 python3 而不是 python2 上

    更新:不确定如果这就是它在 Windows 上的工作方式,那肯定是在 Linux 上。

    【讨论】:

      猜你喜欢
      • 2015-12-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-22
      • 2016-07-19
      • 2015-10-04
      • 2018-06-14
      相关资源
      最近更新 更多