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

相关推荐
天启HTTP15 分钟前
多开账号时,如何避免网络环境暴露异常特征
网络·网络协议·tcp/ip
wapicn9926 分钟前
HTTPS原理详解:从握手到证书链验证,一张SSL证书的完整生命周期
网络协议·https·ssl
bkspiderx35 分钟前
HTTP协议:Web通信的“通用语言”解析
前端·网络协议·http
lunzi_08261 小时前
《图解HTTP》--第5章-与HTTP协作的Web服务器
服务器·前端·http
http阿拉丁神猫3 小时前
TCP、IPv4和IPv6解读
运维·网络协议·tcp/ip
会编程的土豆3 小时前
网络基础核心笔记(HTTP、TCP、前后端通信)
网络·笔记·http
独自破碎E3 小时前
GoCloud - 基于 WebSocket 的实时聊天应用
网络·websocket·网络协议
酉鬼女又兒3 小时前
零基础入门计算机网络物理层:核心任务、四大关键特性与全类型传输媒体(双绞线/同轴电缆/光纤/微波/红外线/可见光)完整详解
网络·网络协议·计算机网络·职场和发展·求职招聘
爱吃羊的老虎3 小时前
【JAVA】python转java:Spring Boot 如何处理 Web 请求
java·前端·spring boot·http
战斗强3 小时前
RTX 5090 Grounded-SAM-2 实时 RTSP 跟踪部署指南
python·conda