gpt4 book ai didi

python 安装 numpy 和 matplotlib 异常(使用 pip)

转载 作者:太空宇宙 更新时间:2023-11-03 14:56:28 25 4
gpt4 key购买 nike

我在安装 numpy 和 matplotlib 时遇到以下错误。我不知道如何解决它。

    D:\Program Files (x86)\Python\Python36-32>pip install matplotlib
Collecting matplotlib
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/matplotlib/
Downloading matplotlib-2.0.2-cp36-cp36m-win32.whl (8.7MB)
14% |████▌ | 1.2MB 33kB/s eta 0:03:46Exception:
Traceback (most recent call last):
File "d:\program files (x86)\python\python36-32\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line 232, in _error_catcher
yield
File "d:\program files (x86)\python\python36-32\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line 314, in read
data = self._fp.read(amt)
File "d:\program files (x86)\python\python36-32\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 60, in read
data = self.__fp.read(amt)
File "d:\program files (x86)\python\python36-32\lib\http\client.py", line 449, in read
n = self.readinto(b)
File "d:\program files (x86)\python\python36-32\lib\http\client.py", line 493, in readinto
n = self.fp.readinto(b)
File "d:\program files (x86)\python\python36-32\lib\socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "d:\program files (x86)\python\python36-32\lib\ssl.py", line 1002, in recv_into
return self.read(nbytes, buffer)
File "d:\program files (x86)\python\python36-32\lib\ssl.py", line 865, in read
return self._sslobj.read(len, buffer)
File "d:\program files (x86)\python\python36-32\lib\ssl.py", line 625, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

我是Python新手,我该如何解决这个问题?任何帮助将不胜感激!

最佳答案

您的问题似乎是由您的互联网连接速度非常慢引起的。如果您无法加快速度或更改接入 pip ,您可以下载matplotlib binariesnumpy binaries并使用 pip install file.whl

离线安装它们

或者几分钟后重试。

关于python 安装 numpy 和 matplotlib 异常(使用 pip),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45533074/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com