首页 PaddleOCR 帖子详情
paddleocr No module named 'tools'
收藏
快速回复
PaddleOCR 问答OCR识别 423 0
paddleocr No module named 'tools'
收藏
快速回复
PaddleOCR 问答OCR识别 423 0

首先,我的python代码在IDE里面能正常运行,也能正常完成图片文字的识别。

我使用pyinstaller -F main.py打包成可运行程序(中间编译也未报错),但是在命令行运行时会出错,如下:

F:\pycode\dist>main.exe
PyInstaller\loader\pyimod02_importers.py:385: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
Traceback (most recent call last):
File "main.py", line 5, in
File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
File "paddleocr\__init__.py", line 14, in
File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
File "paddleocr\paddleocr.py", line 33, in
File "importlib\__init__.py", line 126, in import_module
ModuleNotFoundError: No module named 'tools'
[14552] Failed to execute script 'main' due to unhandled exception!

请问这是什么问题?该如何解决呢?

Python 3.10.4

paddleocr 2.6.1.3
paddlepaddle 2.4.2
pandas 2.0.1

0
收藏
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户