当前位置:   article > 正文

conda install xxx遇到Collecting package metadata (current_repodata.json): failed问题_conda install pytorch-geometric -c rusty1s -c cond

conda install pytorch-geometric -c rusty1s -c conda-forge一直显示collecting

在代码运行过程中遇到ModuleNotFoundError: No module named 'onnxruntime,然后安装onnxruntime,在命令行运行**conda install -c conda-forge onnxruntime **,报以下错误

Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 429 TOO MANY REQUESTS for url <https://mirrors.ustc.edu.cn/anaconda/pkgs/main/win-64/current_repodata.json>
Elapsed: 00:46.975976

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/win-64'
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

换镜像地址也没有得到解决,然后发现不止安装onnxruntime会报这个错误,安装别的模块如numpy也会报这个错误
后来找到一个方法成功了,步骤如下:

一、把路径“Anaconda3/Library/bin ”如下两个文件复制到“Anaconda3/DLLs”:
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
  • 1
  • 2
二、在命令行运行命令清除缓存
conda clean -i
  • 1
三、找到C:\Users\Administrator\.condarc 这个文件,如果没有,试试自行创建,运行
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --show-sources
  • 1
  • 2
  • 3
四、 编辑找到的.condarc文件,拷贝如下内容并覆盖原本的内容:
channels:
  - defaults
show_channel_urls: true
channel_alias: http://mirrors.tuna.tsinghua.edu.cn/anaconda
default_channels:
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
五、在运行conda update命令试试看,会看到
Collecting package metadata (current_repodata.json): done
Solving environment: |
  • 1
  • 2
六、重新运行命令
conda install -c conda-forge onnxruntime 
  • 1

会看到

Collecting package metadata (current_repodata.json): done
Solving environment: -
  • 1
  • 2

安装成功

参考链接: 【综合解决方案】Anaconda: Collecting package metadata (current_repodata.json): failed

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/木道寻08/article/detail/956773
推荐阅读
相关标签
  

闽ICP备14008679号