pip install 安装第三方库时提示 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))............. 解决方法

当尝试在cmd中用pip命令安装第三方库时,出现如下的WARNING

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/arguments/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/arguments/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/arguments/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/arguments/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/arguments/
Could not fetch URL https://pypi.org/simple/arguments/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/arguments/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) - skipping
ERROR: Could not find a version that satisfies the requirement arguments (from versions: none)
ERROR: No matching distribution found for arguments

检查错误信息是网络的原因,通过镜像网站安装仍然失败

关闭代理后一切恢复正常

如果使用了clash需要关闭clash代理(报错[WinError 10061]由于目标计算机积极拒绝,无法连接有时也可以通过该方法解决)

当然出现这样的问题也可以尝试更换pip源

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

其他的源

阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

 

posted @ 2022-09-24 15:24  Triphan  阅读(12754)  评论(0编辑  收藏  举报