运行以下命令:
pip install matplotlib --disable-pip-version-check
提供以下输出:
Collecting matplotlib
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02D9D0F0>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/matplotlib/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02D9DE70>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/matplotlib/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02D9D890>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/matplotlib/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02D9D8D0>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/matplotlib/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02D9DD90>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/matplotlib/
Could not find a version that satisfies the requirement matplotlib (from versions: )
No matching distribution found for matplotlib
答案 0 :(得分:3)
检查您的互联网连接。
似乎无法访问互联网。不太可能,PyPi遇到了临时问题,您应该稍后尝试连接。
答案 1 :(得分:1)
一步一步的非常简单的方法: -
matplotlib(.whl)
matplotlib还需要numpy
,dateutil
,pytz
,pyparsing
,cycler
,setuptools
过程: 打开&gt; python27&gt;&gt;脚本&gt;复制并粘贴matplotlib.whlfile
在python27上打开cmd&gt;脚本&gt; pip install matplotlib-1.5.1-cp27-none win_amd64.whl
我认为这是最简单的安装方法。 如果再遇到同样的问题,请尝试一下然后ping我。
答案 2 :(得分:0)
另一种可能的解决方案 - 我找到了一个可执行安装程序here
以前没有在Google找到它。
答案 3 :(得分:0)
尝试忽略缓存:
pip install matplotlib --no-cache
不知道它是如何工作的,因为当它说ConnectionTimeoutError
时,我以为它没有使用缓存。如果此方法对任何人都有效,我希望听到一个解释。