You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.16 08:35:22