python卡在pip安装包上了,我用的是pycharm,在它的交互命令行里使用
python -m pip install --upgrade pip
始终报错!
Traceback (most recent call last):
File "d:\soft\python3.7\lib\site-packages\pip\_vendor\urllib3\response.py", line 331, in _error_catcher
yield
File "d:\soft\python3.7\lib\site-packages\pip\_vendor\urllib3\response.py", line 413, in read
data = self._fp.read(amt)
File "d:\soft\python3.7\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "d:\soft\python3.7\lib\http\client.py", line 447, in read
n = self.readinto(b)
File "d:\soft\python3.7\lib\http\client.py", line 491, in readinto
n = self.fp.readinto(b)
File "d:\soft\python3.7\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "d:\soft\python3.7\lib\ssl.py", line 1052, in recv_into
return self.read(nbytes, buffer)
File "d:\soft\python3.7\lib\ssl.py", line 911, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
从错误上分析显然是下载超时了,那么怎么解决呢?肯定去找国内的镜像资源啊!于是我网上搜索了一番,终于找到了一个好用的:
python -m pip install --upgrade pip -i https://pypi.douban.com/simple
————————————————
原文链接:https://blog.csdn.net/xqnode/article/details/88431139