python 安装包出现:CondaHTTPError问题的解决

参考:https://blog.csdn.net/ling_xiobai/article/details/78659981

错误如下:

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.continuum.io/pkgs/main/win-64/repodata.json.bz2>
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.
ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='repo.continuum.io', port=443): Max retries exceeded with url: /pkgs/main/win-64/repodata.json.bz2 (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x00000247EB8CC1D0>, 'Connection to repo.continuum.io timed out. (connect timeout=9.15)'))",),)

解决办法:配置清华大学的镜像

(D:\Anaconda) C:\Users\Jackko\Documents>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/

(D:\Anaconda) C:\Users\Jackko\Documents>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/

(D:\Anaconda) C:\Users\Jackko\Documents>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

(D:\Anaconda) C:\Users\Jackko\Documents>conda config --set show_channel_urls yes

最后pip安装就可以了

猜你喜欢

转载自blog.csdn.net/qq_42006303/article/details/88169525