Closed yogi0421 closed 4 months ago
are this is expected?
You're right, tools
is the generic name, it's better to import it with the namespace paddleocr
.
@GreatV did you know the release branch that solved this issue? or this issue are still happen on almost all version of paddleocr?
@yogi0421 This issue is not yet fixed in the release branch.
I encountered the same issue, which only occurred in version 2.8.0; there were no problems in version 2.7.3. To resolve it, I replaced tools.infer with paddleocr.tools.infer which fixed the problem.
@GreatV I carefully reviewed the differences between versions 2.7.3 and 2.8.0, and found that in 2.8.0, "from tools.infer import predict_system" was placed before the definition of the "tools" methods. This is why the issue did not reproduce on 2.7.3. I have already submitted the fix code at https://github.com/PaddlePaddle/PaddleOCR/pull/13348
问题描述 / Problem Description
When I try to import paddleocr, it return
ModuleNotFoundError: No module named 'tools.infer'
, this happened on my environment with Detectron2 are installed.运行环境 / Runtime Environment
复现代码 / Reproduction Code
完整报错 / Complete Error Message
可能解决方案 / Possible solutions
I manually edit the
paddle.py
file, on code from :to :
附件 / Appendix