Skip to content

name 'libpaddle' is not defined #16607

@Yakovtam

Description

@Yakovtam

🔎 Search before asking

  • I have searched the PaddleOCR Docs and found no similar bug report.
  • I have searched the PaddleOCR Issues and found no similar bug report.
  • I have searched the PaddleOCR Discussions and found no similar bug report.

🐛 Bug (问题描述)

[ INFO ] ---> Traceback (most recent call last):
File "paddle\base\core.py", line 267, in
from . import libpaddle
ImportError: DLL load failed while importing libpaddle: 动态链接库(DLL)初始化例程失败。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "src\UI\UI_good_edit_Window.py", line 3563, in translate_img_fun
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
File "src\myutils\TranslateImageClass.py", line 5, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
File "paddleocr.py", line 21, in
from paddle.utils import try_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
File "paddle_init
.py", line 38, in
from .base import core # noqa: F401
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
File "paddle\base_init
.py", line 38, in
from . import ( # noqa: F401
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
File "paddle\base\backward.py", line 28, in
from . import core, framework, log_helper, unique_name
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
File "paddle\base\core.py", line 382, in
if not avx_supported() and libpaddle.is_compiled_with_avx():
NameError: name 'libpaddle' is not defined

我下载的是CPU版本的,为什么会去调用GPU才会使用到的 libpaddle ?

🏃‍♂️ Environment (运行环境)

Name: paddleocr Version: 2.10.0
Name: paddlepaddle Version: 3.0.0

设备名称
处理器 Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz 2.65 GHz
机带 RAM 8.00 GB
设备 ID
产品 ID
系统类型 64 位操作系统, 基于 x64 的处理器
笔和触控 没有可用于此显示器的笔或触控输入

版本 Windows 10 专业版
版本号 22H2
安装日期 ‎2021-‎12-‎18
操作系统内部版本 19045.2251
体验 Windows Feature Experience Pack 120.2212.4180.0

用户:超级管理员
NVIDIA GeForce GTX 950

🌰 Minimal Reproducible Example (最小可复现问题的Demo)

from paddleocr import PaddleOCR
ocr = PaddleOCR(lang='ch',
show_log=False, # 打印日志,可以打印生效的参数
cls_model_dir='ocr/whl/cls/ch_ppocr_mobile_v2.0_cls_infer',
det_model_dir='ocr/whl/det/ch/ch_PP-OCRv4_det_infer',
rec_model_dir='ocr/whl/rec/ch/ch_PP-OCRv4_rec_infer',
)

result = ocr.ocr(img, cls=False)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions