CondaHTTPError: HTTP 000 CONNECTION FAILED for url

安装anaconda之后,进入环境执行conda install  ×××或者conda update --all 全文报错信息如下:

CondaHTTPError: HTTP 000 CONNECTION FAILED for url
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ProxyError(MaxRetryError("HTTPConnectionPool(host='127.0.0.1', port=45433): Max retries exceeded with url: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/repodata.json (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)))",),)


按照网上说的更新清华源并不管用。想到之前用过科学上网工具蓝灯,所以感觉是代理的问题。仔细看报错信息

  host='127.0.0.1', port=45433  由上面的报错信息,查看网络是否走了代理,在命令行输入命令: export | grep -i prox

打印信息如下:

declare -x HTTPS_PROXY="http://127.0.0.1:45433/"         需要关闭
declare -x HTTP_PROXY="http://127.0.0.1:45433/"
declare -x NO_PROXY="localhost,127.0.0.0/8,::1"
declare -x http_proxy="http://127.0.0.1:45433/"
declare -x https_proxy="http://127.0.0.1:45433/"                    需要关闭
declare -x no_proxy="localhost,127.0.0.0/8,::1"


然后使用命令关闭代理:

unset HTTPS_PROXY

在次使用命令关闭代理:

 unset https_proxy


然后重新使用命令   conda install ×××     ;就不会在报HTTP ERROR了。

本人承接各种软件、硬件、算法、各种小程序,javva、C++、python、机器学习等等程序代写业务。欢迎加微信

                                                                     CondaHTTPError: HTTP 000 CONNECTION FAILED for url_第1张图片

 

 

 

你可能感兴趣的:(CondaHTTPError: HTTP 000 CONNECTION FAILED for url)