首页 > Python资料 博客日记
onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasnt able to be load
2024-10-09 15:00:06Python资料围观20次
错误提示:
RuntimeError:D:\a\_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:891 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasnt able to be loaded. Please install the correct version of CUDA andcuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.
1、根据这篇博客,确保cuda和cudnn的安装正确
win10下安装 Anaconda + Cuda + Cudnn + Pycharm + Pytorch_win10安装conda-CSDN博客
2、排除cuda是否正确安装问题,和确定cuda的版本
nvcc -V
3、版本cuda、cudnn和onnxruntime-gpu
依赖关系,见官网Install ONNX Runtime | onnxruntime
cuda 版本为12.x时,请使用下面的方式进行重新安装
pip uninstall onnxruntime-gpu
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
4、如果以上方法还不行,请执行安装命令
pip install onnxruntime-openvino
若出现拒绝访问Anaconda的环境时,根据提示可加参数 --user
pip install onnxruntime-openvino --user
5、最后个人开发环境在第4步,问题解决。
个人开发环境:cuda12.2 + cudnn8.9.2.26 + torch2.2.0
标签:
相关文章
最新发布
- Python: 深入理解 subprocess.run() 执行命令、检查状态与结果处理
- Python 列表全方位解析:创建、操作、删除与遍历的全面指南
- Python 安卓应用构建教程:使用 Kivy 和 AndroidStudio(一)
- Python中类(class)的使用方法
- 【已解决】com.alibaba.excel.exception.ExcelGenerateException: java.lang.InternalError: java.lang.reflect.
- 097、Python 获取文件夹下的所有文件的方法
- 【Python知行篇】代码的曼妙乐章:探索数据与逻辑的和谐之舞
- 将NC栅格表示时间维度的数据提取出来的方法
- 如何使用 matplotlib 在 Python 3 中绘制数据
- mysql操作线上数据要有备份和恢复
点击排行
- 版本匹配指南:Numpy版本和Python版本的对应关系
- 版本匹配指南:PyTorch版本、torchvision 版本和Python版本的对应关系
- Python 可视化 web 神器:streamlit、Gradio、dash、nicegui;低代码 Python Web 框架:PyWebIO
- 相关性分析——Pearson相关系数+热力图(附data和Python完整代码)
- Python与PyTorch的版本对应
- Anaconda版本和Python版本对应关系(持续更新...)
- Python pyinstaller打包exe最完整教程
- Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based proj