microsoft / microsoft/OmniParser

python gradio_demo.py:NameError: name 'libpaddle' is not defined

Open
#216 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
25.4k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

`
(omni) PS D:\AI\OmniParser> python gradio_demo.py
Error: Can not import paddle core while this file exists: d:\anaconda3\envs\omni\Lib\site-packages\paddle\base\libpaddle.pyd
Traceback (most recent call last):
File "d:\anaconda3\envs\omni\Lib\site-packages\paddle\base\core.py", line 268, 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 "D:\AI\OmniParser\gradio_demo.py", line 11, in
from util.utils import check_ocr_box, get_yolo_model, get_caption_model_processor, get_som_labeled_img
File "D:\AI\OmniParser\util\utils.py", line 21, in
from paddleocr import PaddleOCR
File "d:\anaconda3\envs\omni\Lib\site-packages\paddleocr_init_.py", line 14, in
from .paddleocr import (
File "d:\anaconda3\envs\omni\Lib\site-packages\paddleocr\paddleocr.py", line 21, in
from paddle.utils import try_import
File "d:\anaconda3\envs\omni\Lib\site-packages\paddle_init_.py", line 28, in
from .base import core # noqa: F401
^^^^^^^^^^^^^^^^^^^^^^
File "d:\anaconda3\envs\omni\Lib\site-packages\paddle\base_init_.py", line 36, in
from . import core
File "d:\anaconda3\envs\omni\Lib\site-packages\paddle\base\core.py", line 375, in
if not avx_supported() and libpaddle.is_compiled_with_avx():
^^^^^^^^^
NameError: name 'libpaddle' is not defined
`

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported command with gradio_demo.py and inspect the import path through util/utils.py, PaddleOCR, and Paddle's libpaddle loading. Compare the Windows environment and dependency setup against the project's documented requirements; done means the demo starts without the libpaddle ImportError or subsequent NameError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.