首页 > 编程语言 > 详细

解决python -m pip install --upgrade pip 升级不成功问题

时间:2019-05-16 00:41:32      阅读:671      评论:0      收藏:0      [点我收藏+]

1、使用命令出现、

You are using pip version 9.0.1, however version 19.1.1 is available.
You should consider upgrading via the python -m pip install --upgrade pip command.
PS D:\安装\Python36-32\Lib>
PS D:\安装\Python36-32\Lib>
PS D:\安装\Python36-32\Lib> python -m pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB)
    3% |█                               | 40kB 1.4kB/s eta 0:16:01Exception:
Traceback (most recent call last):
  File "D:\安装\Python36-32\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line 232, in _error_catcher
    yield
  File "D:\安装\Python36-32\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line 314, in read
    data = self._fp.read(amt)
  File "D:\安装\Python36-32\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 60, in read
    data = self.__fp.read(amt)
  File "D:\安装\Python36-32\Lib\http\client.py", line 449, in read
    n = self.readinto(b)
  File "D:\安装\Python36-32\Lib\http\client.py", line 493, in readinto
    n = self.fp.readinto(b)
  File "D:\安装\Python36-32\Lib\socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "D:\安装\Python36-32\Lib\ssl.py", line 1009, in recv_into
    return self.read(nbytes, buffer)
  File "D:\安装\Python36-32\Lib\ssl.py", line 871, in read
    return self._sslobj.read(len, buffer)
  File "D:\安装\Python36-32\Lib\ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\安装\Python36-32\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "D:\安装\Python36-32\lib\site-packages\pip\commands\install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "D:\安装\Python36-32\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "D:\安装\Python36-32\lib\site-packages\pip\req\req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "D:\安装\Python36-32\lib\site-packages\pip\download.py", line 821, in unpack_url
    hashes=hashes
  File "D:\安装\Python36-32\lib\site-packages\pip\download.

2、问题解决,这是因为服务器连接超时,使用一下代码即可解决

python -m pip install --upgrade pip -i https://pypi.douban.com/simple

 

解决python -m pip install --upgrade pip 升级不成功问题

原文:https://www.cnblogs.com/karrya/p/10873075.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!