ModuleNotFoundError:即使安装了matplotlib,也没有名为“ matplotlib”的模块

时间:2019-11-08 16:10:02

标签: python matplotlib

我似乎无法导入matplotlib。

import matplotlib
ModuleNotFoundError: No module named 'matplotlib'

尝试conda列表matplotlib给出以下输出:

# Name                    Version                   Build  Channel
matplotlib                3.1.1                    py37_1    conda-forge
matplotlib-base           3.1.1            py37h2852a4a_1    conda-forge

我尝试使用pip安装它:pip install matplotlib。结果是:

Requirement already satisfied: matplotlib in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (3.1.1)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from matplotlib) (1.1.0)
Requirement already satisfied: numpy>=1.11 in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from matplotlib) (1.16.5)
Requirement already satisfied: python-dateutil>=2.1 in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from matplotlib) (2.8.0)
Requirement already satisfied: cycler>=0.10 in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from matplotlib) (2.4.2)
Requirement already satisfied: setuptools in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from kiwisolver>=1.0.1->matplotlib) (41.4.0)
Requirement already satisfied: six>=1.5 in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from python-dateutil>=2.1->matplotlib) (1.12.0)

我该怎么办?

编辑:后来我发现可以将其导入基本环境中。但是在tf-gpu env中仍然无法做到这一点

0 个答案:

没有答案