conda出现http429报错:CondaHTTPError: HTTP 429 TOO MANY REQUESTS for url <xxx>

我的报错信息如下:

cpp 复制代码
CondaHTTPError: HTTP 429 TOO MANY REQUESTS for url <https://mirrors.ustc.edu.cn/anaconda/pkgs/main/linux-64/current_repodata.json>
Elapsed: 00:46.305607

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.
'https://mirrors.ustc.edu.cn/anaconda/pkgs/main/linux-64

在报错的第一行我们可以看到是url:https://mirrors.ustc .edu.cn/anaconda/pkgs/main/linux-64/current_repodata.json有问题,只要把和ustc相关的源删掉就好了,步骤如下:

  1. 查看该环境下的所有channel(channel就是源,用来找你要安装的包的)

    bash 复制代码
    conda config --show channels
  2. 执行命令后,我的电脑上显示:

    bash 复制代码
    channels:
      - defaults
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
      - https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
      - https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
      - conda-forge
  3. 可以发现,我有两个和ustc相关的channel,删除这两个channel

    bash 复制代码
    conda config --remove channels [channel的url]

    在我的电脑上就是:

    bash 复制代码
    conda config --remove channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
    conda config --remove channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
  4. 这个时候再检查一下channel,可以看到没有ustc相关源了:

    bash 复制代码
    执行:conda config --show channels
    bash 复制代码
    展示的信息:
    channels:
      - defaults
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
      - conda-forge
  5. 然后再重新执行刚刚执行失败的命令,就没有http429报错了。

相关推荐
鱼月半4 小时前
两台电脑直连网络不通怎么办?
linux·网络协议
布莱克6059 小时前
HTTP 状态码详解:从分类到实战
计算机网络·http·状态码
梦想不只是梦与想9 小时前
环境管理系统:Conda(一)
python·conda·环境隔离
StevenSurpass10 小时前
打印业务彻底解耦:FastPrintAgent 统一 JSON 模型 + FastReport 引擎的设计与落地
mqtt·http·中间件·打印·fastreport
captain37613 小时前
网络原理(7)-NAT(Network Address Translation)
java·网络·网络协议·java-ee
爱研究的小梁13 小时前
异构链路科普:5G/4G、卫星、专网、WiFi、光纤,如何聚合工作?
网络·网络协议·udp·信息与通信
梦想平凡14 小时前
情怀棋牌源代码焕新记录(一):全新国风UI与原版工程梳理
java·服务器·数据库·websocket·网络协议·cocos2d
K成长日志15 小时前
DALI-2协议简介
网络·网络协议·智能楼宇·智能照明·智能建筑·dali
Shota Kishi1 天前
Solana Shreds 的 UDP 直投架构:Shredstream UDP Forwarding 的设计与实现
网络协议·架构·udp·区块链·solana
Blockbuater_drug1 天前
Protenix: conda 环境部署、零基础安装
conda·开源模型·字节跳动·v2·蛋白结构预测·protenix