我試圖運行此程序Python安裝錯誤沒有匹配的分佈發現pyplot
import matplotlib.pyplot as plt
import numpy
plt.plot([1, 2, 3],[5, 7, 4])
plt.show()
我收到一條錯誤消息: 導入錯誤:沒有名爲pyplot
模塊我已經在Windows上安裝matplotlib 8 64位,Python的2.7與來自bash的PIP命令和我也更新它,得到這個消息的結果:
[email protected]:~$ 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\python_dateutil-2.4.2-py2.7.egg (from matplotlib)
Requirement already up-to-date: six>=1.4 in c:\python27\lib\site-packages\six-1.10.0-py2.7.egg (from matplotlib)
當我試圖在失速pyplot我得到這個按摩:
[email protected]:~$ C:/Python27/Scripts/pip install pyplot
Collecting pyplot
Could not find a version that satisfies the requirement pyplot (from versions:)
No matching distribution found for pyplot
如果任何人有一個想法如何安裝pyplot,爲什麼我的分佈不匹配,我很欣賞你的幫助。
我從wheel文件安裝matplotlib,就像在Windows上一樣,我從來沒有能夠從pip成功安裝64位版本。所以請嘗試下載.whl文件並從中進行安裝。 – BlivetWidget