PaddleOCR icon indicating copy to clipboard operation
PaddleOCR copied to clipboard

ModuleNotFoundError: No module named 'ppocr.modeling' after pip install paddleocr and paddle paddle

Open rbavery opened this issue 2 years ago • 4 comments

  • 系统环境/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

rbavery avatar Oct 24 '22 03:10 rbavery

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

rbavery avatar Oct 24 '22 03:10 rbavery

I'm also seeing this issue with PaddleOCR==2.5

rbavery avatar Oct 24 '22 03:10 rbavery

@LDOUBLEV I also have this problem. I cannot import modeling nad some other libs like losses

JackieXuu avatar Oct 31 '22 10:10 JackieXuu

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

LDOUBLEV avatar Nov 04 '22 07:11 LDOUBLEV