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

相关推荐
Victory_orsh15 小时前
Conda常用命令集锦
conda
interception18 小时前
爬虫逆向:websocket实战案例,全国建筑市场
爬虫·websocket·网络协议
i_am_a_div_日积月累_19 小时前
websocket设置和断开机制
网络·websocket·网络协议
Jennifer33K20 小时前
WebSocket!!
网络·websocket·网络协议
AuroraDPY1 天前
计算机网络:HTTP协议
网络协议·计算机网络·http
小马_6661 天前
[好记性不如烂笔头]RT_Thread http ota升级踩坑笔记(CRC校验不通过)
笔记·物联网·网络协议·http
心一信息1 天前
http与https的详细介绍
网络协议·http·https
r***86981 天前
Nginx中$http_host、$host、$proxy_host的区别
运维·nginx·http
拾忆,想起1 天前
Dubbo服务上线无法调用?一站式排查指南来了
服务器·网络·网络协议·tcp/ip·dubbo
想不明白的过度思考者1 天前
Cookie与Session深度解析:原理、区别
网络·http·客户端·cookie·session·服务端