WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))解决办法汇总(超全)

写在前面

就我自己在windsows系统上的经验来看,很有可能是由于系统代理软件的锅,一般我们可以通过以下三种方法解决。
首先如果你当前使用了网络代理,就是先把你的网络代理给关了!!!再试试。

pip换源

windows换源参考:Ubuntu/Windows给pip换源

  • 打开appdata文件夹
    在这里插入图片描述
  • 新建一个名为pip的文件夹
  • 在pip文件夹里面新建名为pip.ini文件
  • 将下面信息添加在pip.ini文件内
[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn

在这里插入图片描述

指定安装源

通过以下方式安装:
在命令行后面加上 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
其中的xxxxx就是你要安装的包

pip install xxxxxx -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

修改注册表信息

参考:https://github.com/pypa/pip/issues/7424#issuecomment-589675343 和
http://www.noobyard.com/article/p-shumspjw-vm.html

  • Step 1:
    Press Win+R to open Run, type in “regedit” and click OK.
  • Step 2:
    Move to HKEY_CURRENT_USER/Software/Microsoft/Windows/Current Version/Internet Settings.
  • Step 3:
    Find a file with the name ‘ProxyServer’ and 将值修改为0.

在这里插入图片描述
在这里插入图片描述
注意:修改为0之后就不能使用代理科学上网了,下载好包之后,可以再改成1。

猜你喜欢

转载自blog.csdn.net/qq_40608730/article/details/120988702