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报错了。

相关推荐
dog25020 小时前
乐观并发: TCP 与编程实践
网络·网络协议·tcp/ip
吐个泡泡v1 天前
Python包管理工具全对比:pip、conda、Poetry、uv、Flit深度解析
conda·pip·uv·python包管理工具·poetry
melonbo1 天前
c++工程如何提供http服务接口
c++·http
计算机毕设定制辅导-无忧学长1 天前
MQTT 认证与授权机制实践(二)
网络协议
小树苗m1 天前
conda中设置镜像地址(附所有可换的地址)
conda
兮希yxx1 天前
conda配置pytorch虚拟环境
人工智能·pytorch·conda
Jayyih1 天前
嵌入式系统学习Day30(udp)
网络协议·学习·udp
耐达讯通信技术1 天前
耐达讯自动化RS485与Profinet双向奔赴,伺服驱动器连接“稳稳拿捏”
运维·人工智能·物联网·网络协议·自动化·信息与通信
耐达讯通信技术1 天前
嘎嘎厉害!耐达讯自动化RS485转Profinet网关就是食品温控的“天选之子”
运维·服务器·网络·人工智能·网络协议·自动化·信息与通信
川石课堂软件测试1 天前
Oracle 数据库:视图与索引
数据库·网络协议·nginx·http·oracle·grafana·prometheus