当前位置:   article > 正文

pip的时候报错:WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) aft_error: warning: retrying (retry(total=4, connect=n

error: warning: retrying (retry(total=4, connect=none, read=none, redirect=n

题目显示不全报错: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 0x000002004EA35340>, 'Connection to pypi.tuna.tsinghua.edu.cn timed out. (connect timeout=15)')': /simple/pip/

个人理解:首先看报错提示感觉应该是之前换的清华源出问题了,但是已经忘记了怎么换源了

为了验证自己的想法,首先临时换源(阿里源)下载尝试一下:

pip install pygame -i http://mirrors.aliyun.com/pypi/simple/

然后出现了不一样的报错:

WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'.

这个报错也很容易理解,不知道是什么原因,总是就是他不trust阿里源,好说,我们可以设定信任:

pip install pygame -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com 

然后果然成功下载了,到这时候也证明了我的猜想是正确的,只需要换一下默认镜像源应该就可以了。

 接下来就是更换默认镜像源的过程,我已经忘记了怎么更换了,所以参考一下别人的教程

参考教程:(20条消息) pip更改默认镜像源_pip 修改默认源_Stoneplay26的博客-CSDN博客

跟他的教程一样,换成了阿里源

OK,然后pip就正常了! 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/209261
推荐阅读
相关标签
  

闽ICP备14008679号