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

相关推荐
GZ_TOGOGO6 小时前
【2024最新】华为HCIE认证考试流程
大数据·人工智能·网络协议·网络安全·华为
三金121387 小时前
SpringIoC容器的初识
网络·网络协议·rpc
SizeTheMoment9 小时前
初识HTTP协议
网络·网络协议·http
白拾9 小时前
使用Conda管理python环境的指南
开发语言·python·conda
丶213612 小时前
【Conda】Conda命令详解:高效更新与环境管理指南
conda
程序员-珍12 小时前
虚拟机ip突然看不了了
linux·网络·网络协议·tcp/ip·centos
魏大橙14 小时前
linux RCE本地/公网测试
网络·网络协议·udp
l1x1n014 小时前
No.3 笔记 | Web安全基础:Web1.0 - 3.0 发展史
前端·http·html
鄃鳕15 小时前
HTTP【网络】
网络·网络协议·http
读心悦17 小时前
如何在 Axios 中封装事件中心EventEmitter
javascript·http