-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
lazy import PyMuPDF #11685
lazy import PyMuPDF #11685
Conversation
Thanks for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
will merge with an approval from @dyning |
Thanks a lot for fixing this! Do you know which version this will be available in? |
try this : https://pypi.org/project/paddleocr/2.7.2/ |
Hello, I've noticed that PyMuPDF is still a dependency for PaddleOCR, albeit indirectly, and I wanted to bring this to attention in the context of this pull request. The dependency chain involves pdf2docx, which is listed as a requirement in ppstructure/recovery/requirement.txt. Specifically, pdf2docx has PyMuPDF>=1.19.0 as a direct dependency. Since pdf2docx is required for PaddleOCR's ppstructure recovery functionality, it inherently makes PyMuPDF an indirect yet crucial dependency for the project. |
To address the compatibility issues caused by PyMuPDF dependency.
This pull request proposes a lazy import for PyMuPDF. This means:
Additionally, if this PR is accepted, the following actions will be necessary:
I've used
addle.util.try_import
in the implementation, we can also discuss on this implementation.PR 类型 PR types
Others
PR 变化内容类型 PR changes
Others
描述 Description
see above
提PR之前的检查 Check-list
This PR is pushed to the dygraph branch or cherry-picked from the dygraph branch. Otherwise, please push your changes to the dygraph branch.