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构建可执行程序 No module name 'tools' #4390

Closed
a497134710 opened this issue Oct 19, 2021 · 4 comments
Closed

用Pyinstaller构建可执行程序 No module name 'tools' #4390

a497134710 opened this issue Oct 19, 2021 · 4 comments
Assignees

Comments

@a497134710
Copy link

Code:
image

pyinstaller -F test_paddleocr.py
(store_scan) [root@localhost dist]# ./test_paddleocr
Traceback (most recent call last):
File "test_paddleocr.py", line 13, in
File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module
File "init.py", line 15, in
File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module
File "paddleocr.py", line 26, in
ModuleNotFoundError: No module named 'tools'
[4301] Failed to execute script 'test_paddleocr' due to unhandled exception!

增加pyinstaller的hook:
image
但是还是会出现相同的问题, 导包无效

老哥能帮忙解决一下这个问题吗?

@tink2123
Copy link
Collaborator

可以设置一下python的环境变量
在PaddleOCR目录下:
export PYTHONPATH=./

@paddle-bot-old
Copy link

paddle-bot-old bot commented Feb 1, 2022

Since you haven't replied for more than 3 months, we have closed this issue/pr.
If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up.
It is recommended to pull and try the latest code first.
由于您超过三个月未回复,我们将关闭这个issue/pr。
若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。

an1018 pushed a commit to an1018/PaddleOCR that referenced this issue Aug 17, 2022
* add tracking pipeline

* move pptracking to deploy

* update according to review

* refine class define

* add yaml cmake
@xuri422
Copy link

xuri422 commented Jul 14, 2023

这是一个好问题,为什么却一直没人解决呢?

@xuri422
Copy link

xuri422 commented Jul 14, 2023

可以设置一下python的环境变量 在PaddleOCR目录下: export PYTHONPATH=./

请问这个在windows下面如何操作?

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

4 participants