pip更新超时失败之解法

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

pip更新超时失败之解法
————————————————
原文链接:https://blog.csdn.net/xqnode/article/details/88431139

pip更新超时失败之解法pip更新超时失败之解法 夏日轻柔的风 发布了9 篇原创文章 · 获赞 4 · 访问量 1万+ 私信 关注
上一篇:redis的学习


下一篇:[754]ImportError: DLL load failed: 找不到指定的模块