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

相关推荐
2501_9151063215 分钟前
iOS 安装了证书,HTTPS 还是抓不到
android·网络协议·ios·小程序·https·uni-app·iphone
佩奇的技术笔记1 小时前
TCP Keep-Alive 和 HTTP Keep-Alive区别
网络协议·tcp/ip·http
duration~2 小时前
ARP 协议详情
网络·网络协议·tcp/ip·智能路由器
w_t_y_y3 小时前
http通信鉴权(三)基于 Session + CSRF Token 的 Cookie 认证
网络协议·http·csrf
渡我白衣3 小时前
Reactor与多Reactor设计:epoll实战
linux·网络·人工智能·网络协议·tcp/ip·信息与通信·linux网络编程
灋✘逞_兇3 小时前
Protobuf的RPC序列化和调用原理
网络·网络协议·rpc
小笔学长3 小时前
WebSocket 协议:实时双向通信
网络协议·websocket协议·前端后端开发·实时应用实战·websocket性能优化
不吃香菜5673 小时前
WebSocket 超细致完整用法讲解(含原理 + 前端 + 后端 + 实战案例 + 避坑)
前端·网络·websocket·网络协议
xiangxiongfly9153 小时前
Node http
http·node·文件上传·请求·文件下载·响应
..过云雨3 小时前
UDP 通信接口全维度解析:API 设计原理、调用规范与应用实战
网络·网络协议·udp