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

相关推荐
hellojackjiang201113 小时前
socket长连接在手游场景下的技术实践
网络·网络协议·tcp/ip·架构·网络编程
其实防守也摸鱼13 小时前
VS code怎么使用 Conda 安装预编译包
开发语言·网络·c++·vscode·安全·web安全·conda
wangl_9214 小时前
Modbus RTU 与 Modbus TCP 深入指南-安全加固方案
网络·网络协议·tcp/ip·安全·tcp·modbus·rtu
源远流长jerry15 小时前
Linux 网络性能优化:从应用到内核
linux·运维·服务器·网络·网络协议·性能优化
独隅15 小时前
Anaconda、Miniconda 与 Conda 全面对比:核心差异、适用场景与选型指南
conda
独隅15 小时前
Anaconda 与 Conda 全面对比:核心差异、适用场景与选型指南
conda
落叶_Jim15 小时前
Let‘s Encrypt证书有效期缩短至90天后,如何实现自动续期
网络协议·https·ssl
Shingmc317 小时前
【Linux】应用层协议HTTP
网络·网络协议·http
Robot_Nav17 小时前
Python 虚拟环境完全指南:venv、virtualenv 与 Conda
python·conda·virtualenv
独隅17 小时前
Conda 与 Miniconda 全面对比:核心差异、适用场景与选型指南
conda