可能解决方案:WARNING:Retrying (Retry(total=4...after connection broken by ‘SSLError...|Could not fetch URL

这篇具有很好参考价值的文章主要介绍了可能解决方案:WARNING:Retrying (Retry(total=4...after connection broken by ‘SSLError...|Could not fetch URL。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

首先说一下背景:我是在服务器里面跑项目,然后服务器网络的话用的代理proxy

一、下面是我遇到的错误

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/transformers/
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/transformers/
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/transformers/
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/transformers/
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/transformers/
Could not fetch URL https://pypi.org/simple/transformers/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/transformers/ (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 transformers (from versions: none)
ERROR: No matching distribution found for transformers
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) - skipping

错误来源于命令

pip install PackageName

同样地,错误也出现在conda上。

随后,我惊奇的发现,只有在我所创的环境里下载包才会有这样的问题,在base环境里完全可以下载包,一点问题都没有!!!

遇到的第二个问题:大概就是说,有时候pip不行 要用conda 而且可能还要在后面加-c pytorch
今天就是这样,最后成功的命令是

conda install pytorch=1.10.0 torchvision=0.11.1 cudatoolkit=10.2 -c pytorch

不加**-c pytorch**会报错,用 pip 好像也会报错,挺奇怪的,先记录记录吧。

二、解决思路

关于这个问题,网上主要有两种解决思路。

第一种,也就是使用镜像的方式(✘)

pip install PackageName -i xxx --trusted-host xxx

这类型的解决办法我就没成功解决过这类问题(服务器端)!

第二种,用export重新设置一次http代理 (✔)

下面是我之前用的

export http_proxy="http://xx.xx.xx.xx:xxxx"
export https_proxy="https://xx.xx.xx.xx:xxxx"

下面是我现在用的

export http_proxy="http://xx.xx.xx.xx:xxxx"
export https_proxy="http://xx.xx.xx.xx:xxxx"

注意看区别!
改了export后,问题成功被解决!文章来源地址https://www.toymoban.com/news/detail-838640.html

参考博文

到了这里,关于可能解决方案:WARNING:Retrying (Retry(total=4...after connection broken by ‘SSLError...|Could not fetch URL的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 已解决WARNING: Retrying (Retry(total=0,connect=None,read=None,redirect=None, status=None)) after connec

    已解决(pip升级报错)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:997)’))’: /pypi/simple/pip/ WARNING: There was an error checking the latest version of pip. 一个小伙伴用pip命令升级pip,但是

    2024年02月15日
    浏览(30)
  • warning: retrying (retry(total=4, connect=none, read=none, redirect=none, st

    今天在利用pip安装时遇到了一些问题 首先在使用pip语句时,提示pip不是内部命令行,但是其实已经安装了pip 原因:由于python3.x之后pip都是命名为pip3 解决:将安装语句的pip,改为pip3 问题2:使用pip安装安装包时,一直提示 warning: retrying (retry(total=4, connect=none, read=none, redirect

    2024年02月06日
    浏览(30)
  • WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))

    本文介绍了如何解决GitPython安装问题,详细说明了清华源替代梯子的步骤,帮助您顺利处理SSL证书错误。

    2024年02月12日
    浏览(82)
  • WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connec

    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(hos t=‘pypi.org’, port=443): Read timed out. (read timeout=15)”)’: /s 最好是修改pip.conf设置,将国内某一个pypi源设置为默认源,这样就不用每次使用pip3安装包时要指

    2024年02月07日
    浏览(34)
  • Python 使用pip install 时报错(WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, )

    出错: 使用python 命令pip install pandas如下图: 解决方法: 此时运行  pip install pandas  成功。 参考一:关于Python3中的WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by \\\'ReadTimeoutError(\\\"HTTPSConnectionPool(host=\\\'pypi.org\\\', port=443): - 爱码网 参考二:

    2024年02月07日
    浏览(28)
  • 已解决Retrying(Retry (total=4, connect=None,read=None,redirect=None,status=None)) after connection brok

    已解决Retrying(Retry (total=4, connect=None,read=None,redirect=None,status=None)) after connection broken by ‘ReadTimeoutError(“\\\'HTTPSConnectionPool(host=\\\'files.pythonhosted.org , port=443);: Read timed out.(read timeout=15)”,)’: /packages/91/68/c9ce4bd8989333cbb59b42c15d7a43e414d495dba3a21664411564c77b6a/tensorflow-2.6.2-cp36-cp36m-win_amd64.

    2023年04月15日
    浏览(30)
  • 微信小程序demo 调用支付jsapi缺少参数 total_fee,支付签名验证失败 究极解决方案

    其中package: ‘prepay_id=’ + data.prepayId,这一行代码,必须拼接‘prepay_id=’ 文档官方文档: https://pay.weixin.qq.com/docs/merchant/apis/jsapi-payment/jsapi-transfer-payment.html 注意看,后台生成sign时候,拼接的字符串中,也需要加上\\\"prepay_id=\\\" app支付和小程序支付的代码之前还有这种差别和坑…

    2024年02月04日
    浏览(40)
  • MQ消息丢失的可能原因与解决方案

    当我们使用消息队列(MQ)作为分布式系统中的核心组件时,消息丢失是一个常见的问题。消息丢失可能导致数据不一致或功能故障,因此对于许多应用程序来说是不可接受的。本文将介绍几种常见的MQ消息丢失的原因,并提供相应的解决方案。 生产者在发送消息时可能会遇

    2024年02月15日
    浏览(28)
  • 可能是最全的:虚拟机使用失败解决方案汇总

    目录 前言  简单说说 1、安装时报错/安装后无法启用虚拟机  如何解决 方法一:移除Hype-V,成功率:40% 方法二:安装WHP,成功率:99% 方法三:恢复出厂设置,成功率:100% VBX:想滥竽充数?不好意思 补充  2、无法读取键盘输入且无法安装tool(灰色) 方法一:切换至微软默

    2024年02月20日
    浏览(30)
  • kafka乱序消费可能的原因和解决方案

    Kafka乱序消费可能的原因有以下几个: 分区顺序:Kafka中的消息按照分区进行存储和分发,每个分区内的消息是有序的,但不同分区之间的消息顺序是无法保证的。如果消费者在多个分区上进行并行消费,并且不处理消息的顺序,那么消费顺序可能会混乱。 消费者并发度:当

    2024年01月25日
    浏览(27)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包