升级pip超时 python -m pip install --upgrade pip 报 socket.timeout: The read operation timed out

网友投稿 293 2022-09-18

升级pip超时 python -m pip install --upgrade pip 报 socket.timeout: The read operation timed out

升级pip超时 python -m pip install --upgrade pip 报 socket.timeout: The read operation timed out

C:\Users\Acer>python -m pip install --upgrade pipCollecting pip Downloading pip-20.2.2-py2.py3-none-any.whl (1.5 MB) |████ | 174 kB 2.1 kB/s eta 0:10:48ERROR: Exception:Traceback (most recent call last): File "C:\Users\Acer\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_vendor\urllib3\response.py", line 425, in _error_catcher yield File "C:\Users\Acer\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_vendor\urllib3\response.py", line 507, in read data = self._fp.read(amt) if not fp_closed else b"" File "C:\Users\Acer\AppData\Local\Programs\Python\Python38\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read data = self.__fp.read(amt) File "C:\Users\Acer\AppData\Local\Programs\Python\Python38\lib\line 454, in read n = self.readinto(b) File "C:\Users\Acer\AppData\Local\Programs\Python\Python38\lib\line 498, in readinto n = self.fp.readinto(b) File "C:\Users\Acer\AppData\Local\Programs\Python\Python38\lib\socket.py", line 669, in readinto return self._sock.recv_into(b) File "C:\Users\Acer\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "C:\Users\Acer\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1099, in read return self._sslobj.read(len, buffer)socket.timeout: The read operation timed out

使用 python -m pip install --upgrade pip 更新升级pip的时候,因为超时出错了。

解决方法是沿用之前我总结的一个通用的设置超时时间:详情请移步 ​​pip install ** , 设置超时 timeout 时间​​

python -m pip --default-timeout=800 install --upgrade pip

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:linux 下载 jdk 并 模拟点击接受协议 并安装
下一篇:云游戏未来展望
相关文章

 发表评论

暂时没有评论,来抢沙发吧~