更新pip的时候遇到问题ERROR: Exception: Traceback (most recent call last): File "c:\users\dell\anac

今天更新pip的时候报错:
ERROR: Exception:
Traceback (most recent call last):
File “c:\users\dell\anaconda3\lib\site-packages\pip_vendor\urllib3\response.py”, line 397, in _error_catcher
yield
File “c:\users\dell\anaconda3\lib\site-packages\pip_vendor\urllib3\response.py”, line 479, in read
data = self._fp.read(amt)
File “c:\users\dell\anaconda3\lib\site-packages\pip_vendor\cachecontrol\filewrapper.py”, line 62, in read
data = self.__fp.read(amt)
File “c:\users\dell\anaconda3\lib\http\client.py”, line 457, in read
n = self.readinto(b)
File “c:\users\dell\anaconda3\lib\http\client.py”, line 501, in readinto
n = self.fp.readinto(b)
File “c:\users\dell\anaconda3\lib\socket.py”, line 589, in readinto
return self._sock.recv_into(b)
File “c:\users\dell\anaconda3\lib\ssl.py”, line 1071, in recv_into
return self.read(nbytes, buffer)
File “c:\users\dell\anaconda3\lib\ssl.py”, line 929, 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:\users\dell\anaconda3\lib\site-packages\pip_internal\cli\base_command.py”, line 188, in main
status = self.run(options, args)
File “c:\users\dell\anaconda3\lib\site-packages\pip_internal\commands\install.py”, line 345, in run
resolver.resolve(requirement_set)
File “c:\users\dell\anaconda3\lib\site-packages\pip_internal\legacy_resolve.py”, line 196, in resolve
self._resolve_one(requirement_set, req)
然后上网查资料之后发现,这里需要用另一种方法来更新:
管理员身份打开cmd,然后输入:

python -m pip install -U --force-reinstall pip

即可成功更新。
在这里插入图片描述

  • 28
    点赞
  • 41
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 12
    评论
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

许倾墨

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

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

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

打赏作者

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

抵扣说明:

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

余额充值