conda虚拟环境下使用pip安装包报错Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)

Q1: conda虚拟环境下使用pip安装软件报错:

WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fbef88eaef0>: Failed to establish a new connection: [Errno 111] Connection refused',))': /simple/pytorch/ ERROR: Could not find a version that satisfies the requirement pytorch (from versions: none) ERROR: No matching distribution found for pytorch

A2:因为我用来clash的代理,但不清楚加在哪里了

env | grep -i "_proxy"

获得如下信息
在这里插入图片描述
需要在该终端关闭代理,在该终端下就可以使用pip了

unset http_proxy
unset socks_proxy
unset https_proxy

如果需要永久设置,就写道bash里面去吧

Q2:拉取网上信息的urllib.request.Request报错urllib.error.URLError: <urlopen error [Errno 111] Connection refused>

A2:Q1中的问题也会导致这个报错,不妨一试

尝试过的方法:
  1. 设置国内源》https://blog.csdn.net/angelia620/article/details/106334937
  2. /etc/environment下删除代理,但我的代理信息不在这个位置》https://blog.csdn.net/myli_binbin/article/details/89633512
参考

https://blog.csdn.net/littlehaes/article/details/103518285

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值