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

相关推荐
CaracalTiger1 小时前
HTTP 协议的基本概念(请求/响应流程、状态码、Header、方法)问题解决方案大全
开发语言·网络·python·深度学习·网络协议·http·pip
若疆赤云online2 小时前
Minio使用https自签证书
java·网络协议·https
2501_916007473 小时前
Fiddler抓包工具实战指南:结合Charles、Postman优化Web与移动调试流程
websocket·网络协议·tcp/ip·http·网络安全·https·udp
宇宙超级勇猛无敌暴龙战神4 小时前
服务器如何从http升级到https(nginx)
服务器·http·https
00后程序员张6 小时前
上线iOSApp前抓包工具协作保障接口行为一致性(iOS抓包)
websocket·网络协议·tcp/ip·http·网络安全·https·udp
weixin_456588158 小时前
【web 安全】从 HTTP 无状态到现代身份验证机制
前端·web安全·http
哆啦A梦的口袋呀8 小时前
《HTTP权威指南》 第3章 HTTP报文
网络·网络协议·http
chao_7899 小时前
死锁相关知识
网络协议·游戏·测试·死锁
孙克旭_12 小时前
day037-openssh服务与http协议
linux·运维·网络·网络协议·http
萧咕12 小时前
Web3革命:重构互联网的四大支柱
网络协议·数据分析·web3