|
错误提示:RuntimeError:\a\_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:891onnxruntime::python::CreateExecutionProviderInstanceCUDA_PATHissetbutCUDAwasntabletobeloaded.PleaseinstallthecorrectversionofCUDAandcuDNNasmentionedintheGPUrequirementspage (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), makesurethey'reinthePATH,andthatyourGPUissupported.1、根据这篇博客,确保cuda和cudnn的安装正确win10下安装Anaconda+Cuda+Cudnn+Pycharm+Pytorch_win10安装conda-CSDN博客2、排除cuda是否正确安装问题,和确定cuda的版本nvcc-V3、版本cuda、cudnn和onnxruntime-gpu依赖关系,见官网InstallONNXRuntime|onnxruntimecuda版本为12.x时,请使用下面的方式进行重新安装pipuninstallonnxruntime-gpupipinstallonnxruntime-gpu--extra-index-urlhttps://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/4、如果以上方法还不行,请执行安装命令pipinstallonnxruntime-openvino若出现拒绝访问Anaconda的环境时,根据提示可加参数--userpipinstallonnxruntime-openvino--user5、最后个人开发环境在第4步,问题解决。个人开发环境:cuda12.2+cudnn8.9.2.26+torch2.2.0
|
|