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

我的报错信息如下:

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就是源,用来找你要安装的包的)

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

    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

    conda config --remove channels [channel的url]
    

    在我的电脑上就是:

    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相关源了:

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

相关推荐

  1. conda activate xxx-env出现错误CommandNotFoundError

    2024-04-22 10:12:05       33 阅读
  2. CondaHTTPError: HTTP 429 TOO MANY REQUESTS for url

    2024-04-22 10:12:05       38 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-22 10:12:05       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-22 10:12:05       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-22 10:12:05       82 阅读
  4. Python语言-面向对象

    2024-04-22 10:12:05       91 阅读

热门阅读

  1. SWCTF

    SWCTF

    2024-04-22 10:12:05      37 阅读
  2. 负载均衡原理及算法

    2024-04-22 10:12:05       33 阅读
  3. Sentinel

    Sentinel

    2024-04-22 10:12:05      34 阅读
  4. 阿里云难题学习笔记

    2024-04-22 10:12:05       29 阅读
  5. C#基础|数组的使用、字符串的分隔与连接

    2024-04-22 10:12:05       32 阅读
  6. 6、掌握对象在内存中的分配与变迁

    2024-04-22 10:12:05       36 阅读
  7. 20个npm常用命令及详解

    2024-04-22 10:12:05       29 阅读
  8. 监控指定任务,结束钉钉通知

    2024-04-22 10:12:05       44 阅读
  9. 【设计模式】模板方法模式

    2024-04-22 10:12:05       27 阅读