The third-party dynamic library (cudnn64_8.dll) that Paddle depends on is not configured correctly.

执行从图片解析文字的代码

result = ocr.ocr(img_path, cls=True)

得到如下输出

RuntimeError: (PreconditionNotMet) The third-party dynamic library (cudnn64_8.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 ..\paddle\phi\backends\dynload\dynamic_loader.cc:305)

显卡驱动528以上用的是cuda 12.0,没找到对应的cudnn版本,所以可以下载旧版的驱动 https://www.nvidia.com/en-us/drivers/results/87789/

深度学习三件套安装依赖指南

你可能感兴趣的:(踩坑笔记,paddle)