pip升级报错怎么办python -m pip install --upgrade pip


C:\Users\ASUS>python -m pip install --upgrade pip
Collecting pip
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001A8E80F5630>, 'Connection to files.pythonhosted.org timed out. (connect timeout=15)')': /packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl
  Downloading https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl (1.4MB)
    3% |█                               | 40kB 1.7kB/s eta 0:12:53Exception:
Traceback (most recent call last):
  File "C:\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 360, in _error_catcher
    yield
  File "C:\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 442, in read
    data = self._fp.read(amt)
  File "C:\Python37\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "C:\Python37\lib\http\client.py", line 447, in read
    n = self.readinto(b)
  File "C:\Python37\lib\http\client.py", line 491, in readinto
    n = self.fp.readinto(b)
  File "C:\Python37\lib\socket.py", line 589, in readinto
    return self._sock.recv_into(b)
  File "C:\Python37\lib\ssl.py", line 1049, in recv_into
    return self.read(nbytes, buffer)
  File "C:\Python37\lib\ssl.py", line 908, in read
    return 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 "C:\Python37\lib\site-packages\pip\_internal\cli\base_command.py", line 179, in main
    status = self.run(options, args)
  File "C:\Python37\lib\site-packages\pip\_internal\commands\install.py", line 315, in run
    resolver.resolve(requirement_set)
  File "C:\Python37\lib\site-packages\pip\_internal\resolve.py", line 131, in resolve
    self._resolve_one(requirement_set, req)
  File "C:\Python37\lib\site-packages\pip\_internal\resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "C:\Python37\lib\site-packages\pip\_internal\resolve.py", line 242, in _get_abstract_dist_for
    self.require_hashes
  File "C:\Python37\lib\site-packages\pip\_internal\operations\prepare.py", line 334, in prepare_linked_requirement
    progress_bar=self.progress_bar
  File "C:\Python37\lib\site-packages\pip\_internal\download.py", line 878, in unpack_url
    progress_bar=progress_bar
  File "C:\Python37\lib\site-packages\pip\_internal\download.py", line 702, in unpack_http_url
    progress_bar)
  File "C:\Python37\lib\site-packages\pip\_internal\download.py", line 946, in _download_http_url
    _download_url(resp, link, content_file, hashes, progress_bar)
  File "C:\Python37\lib\site-packages\pip\_internal\download.py", line 639, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "C:\Python37\lib\site-packages\pip\_internal\utils\hashes.py", line 62, in check_against_chunks
    for chunk in chunks:
  File "C:\Python37\lib\site-packages\pip\_internal\download.py", line 607, in written_chunks
    for chunk in chunks:
  File "C:\Python37\lib\site-packages\pip\_internal\utils\ui.py", line 159, in iter
    for x in it:
  File "C:\Python37\lib\site-packages\pip\_internal\download.py", line 596, in resp_read
    decode_content=False):
  File "C:\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 494, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "C:\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 459, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "C:\Python37\lib\contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 365, in _error_catcher
    raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ROOOOOOM

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值