raise ReadTimeoutError(self._pool, None, 'Read timed out.') pip._vendor.urllib3.exceptions.ReadTimeo

在尝试使用Python的pip安装第三方库时遇到了ReadTimeoutError,错误源于HTTPS连接池在读取时超时。问题发生在pip下载文件的过程中,通过追查错误堆栈,可以发现错误源自于`pip/_vendor/requests/packages/urllib3/response.py`。解决方法是增加pip的默认超时时间,例如使用`pip --default-timeout=100 install -U Pillow`来设置超时时间为100秒。
摘要由CSDN通过智能技术生成

python 安装第三方库,超时报错--Read timed out.

Traceback (most recent call last):
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 228, in _error_catcher
yield
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 310, in read
data = self._fp.read(amt)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 49, in read
data = self.__fp.read(amt)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/http/client.py", line 433, in read
n = self.readinto(b)
File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/http/client.py", line 473

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值