赞
踩
在代码运行过程中遇到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'
换镜像地址也没有得到解决,然后发现不止安装onnxruntime会报这个错误,安装别的模块如numpy也会报这个错误
后来找到一个方法成功了,步骤如下:
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
conda clean -i
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --show-sources
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
Collecting package metadata (current_repodata.json): done
Solving environment: |
conda install -c conda-forge onnxruntime
会看到
Collecting package metadata (current_repodata.json): done
Solving environment: -
安装成功
参考链接: 【综合解决方案】Anaconda: Collecting package metadata (current_repodata.json): failed
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。