Skip to content
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

PyInstaller打包报错 #35

Open
monkeycc opened this issue Jul 17, 2024 · 2 comments
Open

PyInstaller打包报错 #35

monkeycc opened this issue Jul 17, 2024 · 2 comments

Comments

@monkeycc
Copy link


cd ./PPOCRLabel
# 安装pyinstaller
pip install pyinstaller

# 重新生成资源
pyrcc5 -o libs/resources.py resources.qrc

# 打包可执行程序
pyinstaller -c PPOCRLabel.py --collect-all paddleocr --collect-all pyclipper --collect-all imghdr --collect-all skimage --collect-all imgaug --collect-all scipy.io --collect-all lmdb --collect-all paddle --hidden-import=pyqt5  -p ./libs -p ./ -p ./data -p ./resources -F

# 运行dist中的可执行程序,以windows为例
PPOCRLabel.exe
Traceback (most recent call last):
  File "PPOCRLabel.py", line 66, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "paddleocr\__init__.py", line 14, in <module>
    from .paddleocr import *
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "paddleocr\paddleocr.py", line 60, in <module>
    from ppocr.utils.network import (
  File "C:\Users\mm\AppData\Local\Temp\_MEI355082\paddleocr\ppocr\utils\network.py", line 18, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
[27212] Failed to execute script 'PPOCRLabel' due to unhandled exception!
@GreatV
Copy link
Collaborator

GreatV commented Jul 17, 2024

paddleocr少了requests依赖

@monkeycc
Copy link
Author

说明打包教程有问题

官方应该推出打包好的程序
打包多费劲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants