pip install安装超时怎么办!
我真的是,每次下载包都会超时,可能是网不好吧…
就报这种错:
ERROR: Exception:
Traceback (most recent call last):
File “d:\360downloads\python3.8\lib\site-packages\pip_vendor\urllib3\response.py”, line 425, in _error_catcher
yield
File “d:\360downloads\python3.8\lib\site-packages\pip_vendor\urllib3\response.py”, line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File “d:\360downloads\python3.8\lib\site-packages\pip_vendor\cachecontrol\filewrapper.py”, line 62, in read
data = self.__fp.read(amt)
File “d:\360downloads\python3.8\lib\http\client.py”, line 454, in read
n = self.readinto(b)
File “d:\360downloads\python3.8\lib\http\client.py”, line 498, in readinto
n = self.fp.readinto(b)
File “d:\360downloads\python3.8\lib\socket.py”, line 669, in readinto
return self._sock.recv_into(b)
File “d:\360downloads\python3.8\lib\ssl.py”, line 1241, in recv_into
return self.read(nbytes, buffer)
File “d:\360downloads\python3.8\lib\ssl.py”, line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
用这个命令也不太好使…但至少能看到下载的进度条
pip --default-timeout=100 install -U 包名
!!我今天知道了一个快速下载的解决方法!那就是换源!!
pip install 包名 -i https://pypi.tuna.tsinghua.edu.cn/simple
这个是换到清华的源!超级快我天哪!!!