python安装时出现CondaHTTPError:: HTTP 000 CONNECTION FAILED for url 和Retrying (Retry(total=4, 错误解决办法

在安装Python时遇到CondaHTTPError: HTTP 000 CONNECTION FAILED问题,本文提供针对该错误的两种解决方案,包括调整镜像源。

问题一:

安装scikit-learn出现 CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud/linux-64/rpodata.json>Elapsed: -

解决办法:

#首先先添加清华的镜像源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes

#如果无法解决,则删除.condarc配置文件中部分内容
到C:\user\你的用户名.condarc文件下,把default那一行删除,即可解决问题。
# 使用conda进行安装
Conda install scikit-learn

问题二:

Pip安装出现Retrying
(base) C:\Users\Administrator>conda create -n yolov10 python=3.10 3 channel Terms of Service accepted Channels: - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2 - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - defaults Platform: win-64 Collecting package metadata (repodata.json): / Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=t \ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'Connectiont - Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeout - Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeout \ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeout - Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoun - Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeout / Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeout - Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeout | Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeout | Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeout failed CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/msys2/noarch/repodata.json> 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. If your current network has https://repo.anaconda.com blocked, please file a support request with your network engineering team. 'https//repo.anaconda.com/pkgs/msys2/noarch'解决一下这个问题
最新发布
08-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值