【paddleocr】The third-party dynamic library (cublas64_118.dll;cublas64_11.dll)

环境

CUDA:
在这里插入图片描述

CUDNN:
在这里插入图片描述

paddleocr:
在这里插入图片描述

问题

执行

 paddleocr --image_dir blob.jpeg --use_gpu true

报错:

在这里插入图片描述

Traceback (most recent call last):
  File "C:\Users\dynamic\.conda\envs\d2l-zh\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\dynamic\.conda\envs\d2l-zh\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\dynamic\AppData\Roaming\Python\Python38\Scripts\paddleocr.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "C:\Users\dynamic\AppData\Roaming\Python\Python38\site-packages\paddleocr\paddleocr.py", line 882, in main
    result = engine.ocr(
  File "C:\Users\dynamic\AppData\Roaming\Python\Python38\site-packages\paddleocr\paddleocr.py", line 729, in ocr
    dt_boxes, rec_res, _ = self.__call__(img, cls, slice)
  File "C:\Users\dynamic\AppData\Roaming\Python\Python38\site-packages\paddleocr\tools\infer\predict_system.py", line 144, in __call__
    rec_res, elapse = self.text_recognizer(img_crop_list)
  File "C:\Users\dynamic\AppData\Roaming\Python\Python38\site-packages\paddleocr\tools\infer\predict_rec.py", line 677, in __call__
    self.predictor.run()
RuntimeError: (PreconditionNotMet) The third-party dynamic library (cublas64_118.dll;cublas64_11.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:312)
  [operator < fc > error]

解决方案

查了issues,发现了解决方案:Installation issue of paddlepaddle-gpu in CUDA Version:12.0 #10078
paddlepaddle-gpu在CUDA Version:12.0中的安装问题
还有这个:RuntimeError: (PreconditionNotMet) The third-party dynamic library (cudnn64_8.dll) that Paddle depends on is not configured correctly. (error code is 126)

第一步

先去自己电脑的cuda路径下,找到cublas64_11.dll,当然,找不到,但是有个名字差不多的cublas64_12.dll,先copy到C:\Windows\System32路径下,死马当成活马医。

在这里插入图片描述
再次执行

 paddleocr --image_dir blob.jpeg --use_gpu true

同样的报错,此时,将System32文件夹下面咱们copy过来的cublas64_12.dll修改文件名为cublas64_11.dll,再次执行

 paddleocr --image_dir blob.jpeg --use_gpu true

成功!

测试了一下,gpu跑ocr的速度,大概是cpu的10倍多一点。

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
PaddlePaddle是一个开源的深度学习平台,可以用于构建和训练深度学习模型。如果你想使用PaddlePaddle,可以通过源码编译的方式来安装。首先,你需要在Git Bash中执行以下两条命令来将PaddlePaddle的源码克隆到本地,并进入Paddle目录: ``` git clone https://github.com/PaddlePaddle/Paddle.git cd Paddle ``` 接下来,你可以根据自己的需求进行编译。如果你使用的是Windows系统,可以使用源码编译来安装符合你需求的PaddlePaddle版本。具体的编译步骤可以参考官方文档中的Windows下源码编译部分\[2\]。 如果你想在docker镜像中编译PaddlePaddle,可以使用以下命令启动docker镜像并进行编译。如果你需要编译CPU版本,可以使用以下命令: ``` sudo docker run --name paddle-test -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-dev /bin/bash ``` 如果你需要编译GPU版本,可以使用以下命令: ``` sudo nvidia-docker run --name paddle-test -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-dev /bin/bash ``` 以上是关于使用源码编译PaddlePaddle的一些基本步骤和命令。你可以根据自己的需求和操作系统选择适合的方式来安装PaddlePaddle。 #### 引用[.reference_title] - *1* *2* *3* [《PaddlePaddle从入门到炼丹》一——新版本PaddlePaddle的安装](https://blog.csdn.net/qq_33200967/article/details/83052060)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

盖丽男

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值