PyTorch安装报错求助:CondaHTTPError连接失败问题
解决Conda安装PyTorch时的HTTP 000连接失败问题
CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://conda.anaconda.org/pytorch/win-64/current_repodata.json,耗时:-。尝试获取该URL时发生HTTP错误,提示HTTP错误通常为间歇性问题,简单重试即可解决,涉及地址:'https//conda.anaconda.org/pytorch/win-64'
- 直接重试安装:按报错提示,这类问题多为间歇性网络波动,重新执行你的PyTorch安装命令即可,比如
conda install pytorch torchvision torchaudio cpuonly -c pytorch - 检查网络状态:确认本地网络稳定,尝试访问
https://conda.anaconda.org/pytorch/win-64验证连通性,若无法访问可切换网络(如手机热点)或关闭代理 - 更换国内conda镜像源:国内镜像能避免境外源的连接问题,执行以下命令添加清华镜像:
之后执行安装命令时,去掉原命令中的conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/ conda config --set show_channel_urls yes-c pytorch参数,让conda优先使用国内源 - 清除conda缓存:缓存损坏也可能引发连接异常,执行
conda clean -i清除索引缓存后再尝试安装
内容的提问来源于stack exchange,提问作者user20270408
相关产品推荐
相关产品推荐

