【pip更新报错解决方法】

pip更新报错解决方法

偶然间,在pip更新时报错


问题描述

执行pip更新代码pip install --upgrade pip时候报错
错误代码:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001A617ACA490>, ‘Connection to pypi.org timed out. (connect timeout=15)’)’: /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001A617ACA790>, ‘Connection to pypi.org timed out. (connect timeout=15)’)’: /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001A617ACA910>, ‘Connection to pypi.org timed out. (connect timeout=15)’)’: /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001A617ACAA00>, ‘Connection to pypi.org timed out. (connect timeout=15)’)’: /simple/pip/
Collecting pip
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001A617BA1400>, ‘Connection to files.pythonhosted.org timed out. (connect timeout=15)’)’: /packages/50/c2/e06851e8cc28dcad7c155f4753da8833ac06a5c704c109313b8d5a62968a/pip-23.2.1-py3-none-any.whl
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001A617BA16A0>, ‘Connection to files.pythonhosted.org timed out. (connect timeout=15)’)’: /packages/50/c2/e06851e8cc28dcad7c155f4753da8833ac06a5c704c109313b8d5a62968a/pip-23.2.1-py3-none-any.whl
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001A617BA1850>, ‘Connection to files.pythonhosted.org timed out. (connect timeout=15)’)’: /packages/50/c2/e06851e8cc28dcad7c155f4753da8833ac06a5c704c109313b8d5a62968a/pip-23.2.1-py3-none-any.whl
Downloading pip-23.2.1-py3-none-any.whl (2.1 MB)
---------------------------------------- 2.1/2.1 MB 11.1 kB/s eta 0:00:00
ERROR: To modify pip, please run the following command:
D:\ANACONDA\envs\wspytorch\python.exe -m pip install --upgrade pip

在这里插入图片描述


解决方案:

参考大神帖子
https://blog.csdn.net/Nora_CC/article/details/130105864

安装pip
python -m ensurepip

更新pip
python -m pip install --upgrade pip

  • 24
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值