python怎么安装pyplot_Python安装错误没有为pyplot找到匹配的分发

在尝试运行包含matplotlib.pyplot的Python程序时遇到了ImportError,已安装matplotlib但系统仍提示未找到pyplot模块。使用pip升级matplotlib后问题依旧。尝试单独安装pyplot时,返回找不到匹配版本的错误。寻求解决方案。
摘要由CSDN通过智能技术生成

我正在尝试运行此程序

import matplotlib.pyplot as plt

import numpy

plt.plot([1, 2, 3],[5, 7, 4])

plt.show()

我收到一条错误消息:

ImportError:没有名为pyplot的模块

我已经在Windows 8 64位上安装了matplotlib,使用来自bash的pip命令安装了Python 2.7,我也更新了它,结果得到了这条消息:

Aneta@AKZ-5K-Computer:~$ C:/Python27/Scripts/pip install --upgrade matplotlib

Requirement already up-to-date: matplotlib in c:\python27\lib\site-packages

Requirement already up-to-date: pyparsing>=1.5.6 in c:\python27\lib\site-packages\pyparsing-2.0.3-py2.7-win32.egg (from matplotlib)

Requirement already up-to-date: numpy>=1.6 in c:\python27\lib\site-packages (from matplotlib)

Requirement already up-to-date: pytz in c:\python27\lib\site-packages\pytz-2015.6-py2.7.egg (from matplotlib)

Requirement already up-to-date: python-dateutil in c:\python27\lib\site-packages\pytho

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值