PaddleOCR
PaddleOCR copied to clipboard
ModuleNotFoundError: No module named 'ppocr.modeling' after pip install paddleocr and paddle paddle
- 系统环境/System Environment:Mac
- 版本号/Version:Paddle:2.3.2 PaddleOCR:2.6.0.3
- 运行指令/Command Code:
from ppocr.modeling.backbones.det_mobilenet_v3 import MobileNetV3
- 完整报错/Complete Error Message:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Input In [7], in <cell line: 1>()
----> 1 from ppocr.modeling.backbones.det_mobilenet_v3 import MobileNetV3
ModuleNotFoundError: No module named 'ppocr.modeling'
I've made a condo environment and installed packages with pip following these instructions: https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.5/doc/doc_en/quickstart_en.md
And the command code that reveals the error is used in the DiveIntoOCR book: https://github.com/PaddleOCR-Community/Dive-into-OCR/blob/main/notebook_en/2.text_detection/text_detection_practice.ipynb
import ppocr
dir(ppocr)
returns
['__doc__',
'__file__',
'__loader__',
'__name__',
'__package__',
'__path__',
'__spec__',
'data',
'postprocess',
'utils']
so it looks like only some submodules are available but I don't know why
I'm also seeing this issue with PaddleOCR==2.5
@LDOUBLEV I also have this problem. I cannot import modeling nad some other libs like losses
hi,if you try training your own model using PaddleOCR, please clone https://github.com/PaddlePaddle/PaddleOCR.
The paddleocr pypi whl only support model inference