Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

通过源码 pip install . 安装 包失败 #10258

Closed
sjy3 opened this issue Jun 28, 2023 · 3 comments
Closed

通过源码 pip install . 安装 包失败 #10258

sjy3 opened this issue Jun 28, 2023 · 3 comments

Comments

@sjy3
Copy link

sjy3 commented Jun 28, 2023

请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

由于pip 当前提供的最新版本为:paddleocr-2.6.1.3,
在运行时会导致:ModuleNotFoundError: No module named 'tools.infer'; 'tools' is not a package
看到PaddleOCR 已经解决了该问题:32fe3c9
但是 pip包没有更新,于是打算通过源码安装 padleocr,导致失败。

  • 系统环境/System Environment:MAC

  • 版本号/Version:Paddle: PaddleOCR: v2.6.0 release/2.6分支

  • 问题相关组件/Related components:

  • 运行指令/Command Code:pip install .

  • 完整报错/Complete Error Message:
    DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at Python is deprecating distutils.cfg Homebrew/homebrew-core#76621
    Processing /Users/shijinyu7/PycharmProjects/PaddleOCR
    Preparing metadata (setup.py) ... error
    error: subprocess-exited-with-error

    × python setup.py egg_info did not run successfully.
    │ exit code: -11
    ╰─> [0 lines of output]
    [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

@shiyutang shiyutang self-assigned this Jun 29, 2023
@shiyutang
Copy link
Collaborator

shiyutang commented Jun 29, 2023

你好,我在本地尝试
pip install -e .
会报错
image

ModuleNotFoundError: No module named 'Polygon'

需要进入到PaddleOCR目录,安装:

pip3 install -r requirements.txt

随后运行
pip install -e .
即可安装:
image

参考:https://github.com/PaddlePaddle/PaddleOCR/blob/18ddb6d5f9bdc2c1b0aa7f6e399ec0f76119dc87/doc/doc_en/installation_en.md

@shiyutang
Copy link
Collaborator

以上回答已经充分解答了问题,如果有新的问题欢迎随时提交issue,或者在此条issue下继续回复~
我们开启了飞桨套件的ISSUE攻关活动,欢迎感兴趣的开发者参加:PaddlePaddle/PaddleOCR#10223

@sjy3
Copy link
Author

sjy3 commented Jul 4, 2023

@shiyutang 非常感谢,上述方案解决了我的问题。

@sjy3 sjy3 closed this as completed Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants