当前位置: 首页 > article >正文

Anaconda 中遇到CondaHTTPError: HTTP 404 NOT FOUND for url的问题及解决办法

最近在跑一个开源项目遇到了以下问题,查了很多资料都大(抄)同(来)小(抄)异(去)的,解决不了根本问题,费了很大的劲终于得以解决,记录如下:

1、问题及过程:

(myenv) D:\Workspace\python\XXXXX>conda install python=3.6.13 
Solving environment: done

.....

Proceed ([y]/n)? y


Downloading and Extracting Packages
certifi-2021.5.30    | 142 KB    |                |   0%  
......

CondaHTTPError: HTTP 404 NOT FOUND for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/certifi-2021.5.30-py36haa95532_0.tar.bz2>
Elapsed: 00:00.050146

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.

CondaHTTPError: HTTP 404 NOT FOUND for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/python-3.6.13-h3758d61_0.tar.bz2>
Elapsed: 00:00.189201

.......

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.

2、解决办法:

在用户目录下(如win10中C:\Users\xxx\),修改.condarc文件,内容替换如下:

channels:
  - defaults
show_channel_urls: true
channel_alias: https://repo.anaconda.com
default_channels:
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/free
  - https://repo.anaconda.com/pkgs/r
  - https://repo.anaconda.com/pkgs/pro
  - https://repo.anaconda.com/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

关键点在于:default_channels用的官方的源,custom_channels用的清华的源。

问题最终得以解决。


http://www.kler.cn/a/296696.html

相关文章:

  • 电脑驱动分类
  • 大模型训练框架LLaMAFactory覆盖预训练指令微调强化学习评估全流程
  • Python 错误 AttributeError 解析,实际错误实例详解
  • go系列之 cron 表达式
  • 如何在实际应用中优化AI大模型性能
  • 纯CSS实现卡片欢动效果
  • 关于腾讯IM消息ID不统一的问题?服务端的MsgKey和前端的msgID不一样
  • 强大的EmotiVoice:易魔声 : 多音色提示控制TTS
  • 微信小程序登录与获取手机号 (Python)
  • 基于Android Studio的行程记录APK开发指南(三)---界面设计及两种方法获取用户位置
  • AI在医学领域:MIL回归用于前列腺癌复发预测
  • Linux 性能调优之CPU上下文切换
  • halcon 畸变矫正算子 VectorToAnison
  • lambda 表达式(匿名函数)的具体应用和使用场景
  • FxFactory 8 for Mac 视觉特效插件包安装
  • 【华为笔试2】
  • 【深度学习】LSTM模型,GRU模型计算公式及其优缺点介绍
  • Leetcode面试经典150题-2.两数相加
  • 基于Spring Boot构建一个点餐系统
  • 哥伦比亚TV:重塑影视娱乐版图,开启全球文化共鸣之旅