使用PIP安装Matplotlib

时间:2017-10-31 08:53:20

标签: python matplotlib pip

当我尝试运行我的python脚本时,我收到以下错误

import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'

所以我尝试使用Matplotlib     " pip install matplotlib"

然后我收到错误

Requirement already satisfied: matplotlib in 
c:\users\harla\anaconda2\lib\site-packages
Requirement already satisfied: numpy>=1.7.1 in 
c:\users\harla\anaconda2\lib\site-packages (from matplotlib)
Requirement already satisfied: six>=1.10 in 
c:\users\harla\anaconda2\lib\site-packages (from matplotlib)
Requirement already satisfied: python-dateutil in 
c:\users\harla\anaconda2\lib\site-packages (from matplotlib)
Requirement already satisfied: functools32 in 
c:\users\harla\anaconda2\lib\site-packages (from matplotlib)
Requirement already satisfied: pytz in c:\users\harla\anaconda2\lib\site-
packages (from matplotlib)
Requirement already satisfied: cycler>=0.10 in 
c:\users\harla\anaconda2\lib\site-packages (from matplotlib)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in 
c:\users\harla\anaconda2\lib\site-packages (from matplotlib)

我知道我已经安装了anaconda。我不想为此使用Anaconda。如何安装matplotlib库?

1 个答案:

答案 0 :(得分:0)

我通过将环境变量删除到C:\ Users \ harla \ Anaconda2 \ Scripts_flag

解决了这个问题

不确定是否有更好的解决方案。