python安装包出现ssl证书验证失败
本人在安装modelscope包时一直安装失败
报如下错误
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:852)'),)': /simple/modelscope/ could not fetch url https://pypi.org/simple/modelscope/: there was a problem confirming the ssl certificate: httpsconnectionpool(host='pypi.org', port=443): max retries exceeded with url: /simple/modelscope/ (caused by sslerror(ssleoferror(8, 'eof occurred in violation of protocol (_ssl.c:852)'),)) - skipping.
总以为是用了镜像源的原因,删除了使用的镜像源,还是没能解决,甚至临时禁用 ssl 验证也没有解决。
解决过程
突然意识到自己挂了梯子,开了代理,于是我把它关了再重新安装,成功了!!!
本人花了这么多时间解决这个问题,没想到就只是因为开了代理,其实之前也遇到过这个问题,也知道开代理会影响安装包,但总是在出现类似问题时,无法第一时间想起关闭代理!!!
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持代码网。
发表评论