pip安装onnxruntime

pip安装onnxruntime,第1张

pip安装onnxruntime_gpu1.6.0失败

安装onnxruntime_gpu时需要对应cuda版本安装,笔者安装的cuda版本为10.2,对应onnxruntime_gpu应该安装1.5-1.6的,但是直接用命令pip install onnxruntime-gpu 安装的版本是最新版,指定版本安装pip install onnxruntime-gpu==1.6.0同样报错

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://pypi.ngc.nvidia.com
ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.5.2 (from versions: 1.7.0, 1.8.0, 1.8.1, 1.9.0, 1.10.0, 1.11.0, 1.11.1)
ERROR: No matching distribution found for onnxruntime-gpu==1.5.2

找不到指定版本。
折腾半天找到方法:
在https://pypi.org/project/onnxruntime-gpu/1.6.0/#files找到需要的版本,其他版本可点击
选择版本号,再点击download

根据需求下载轮子

下载好后激活需要安装的环境。
这里笔者使用pycharm
直接pip install xx.whl报错了

需要用命令pip debug --verbose查看轮子命名规则

这里我将轮子名称改为onnxruntime_gpu-1.6.0-cp37-abi3-win_amd64.whl
然后pip install

conda list查看

安装成功!

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/869260.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-13
下一篇 2022-05-13

发表评论

登录后才能评论

评论列表(0条)

保存