QGIS安装Paddle-GPU报错

QGIS安装Paddle-GPU报错

报错内容

使用下面代码查看paddle-gpu是否安装成功

import paddle
paddle.utils.run_check()

得到如下报错

RuntimeError: (PreconditionNotMet) The third-party dynamic library (cublas64_102.dll;cublas64_10.dll) that Paddle depends on is not configured correctly. (error code is 126)
  Suggestions:
  1. Check if the third-party dynamic library (e.g. CUDA, CUDNN) is installed correctly and its version is matched with paddlepaddle you installed.
  2. Configure third-party dynamic library environment variables as follows:
  - Linux: set LD_LIBRARY_PATH by `export LD_LIBRARY_PATH=...`
  - Windows: set PATH by `set PATH=XXX; (at C:\home\workspace\Paddle_release\paddle\fluid\platform\dynload\dynamic_loader.cc:265)

检查发现其他conda环境中能正常使用,CUDA安装与环境变量配置正确,在QGIS中检查环境变量,发现path中并没有C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin。

解决

  • 对于桌面端,可以在QGIS\bin\qgis-ltr-bin.env中的PATH后面加上C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin
    QGIS安装Paddle-GPU报错_第1张图片

  • 对于在vscode中开发插件,可以相同文件夹下的o4w_env.bat中将set path改为set path=%OSGEO4W_ROOT%\bin;%WINDIR%\system32;%WINDIR%;%WINDIR%\system32\WBem;%CUDA_BIN_PATH%
    QGIS安装Paddle-GPU报错_第2张图片

你可能感兴趣的:(paddle,Python,QGIS,qgis,paddlepaddle)