Compiling python code into a single exe

此生再无相见时 提交于 2019-12-01 07:34:18
Joël

My two cents: did you make a test using the debug option of PyInstaller?

Just update your specfile:

exe = EXE( pyz,
           [...]
           debug=True,
           [...])

(Note: in order to avoid numerous message boxes, you may want to set console output: console=True)

Maybe it would return some useful data. Please provide us with output in this case (if there's any).


According to the output you get, this is quite a common problem, because if PyInstaller resolves dependencies for your modules, dependencies of dependencies may be forgotten.

In your case, Tcl is missing, and this is needed by some Tkinter library: you should take a look here: Python, Pyinstaller creating shortcuts in windows

According to documentation:

Elaborating on Makespec.py, this is the supported command line: python Makespec.py [opts] [ ...] Where allowed OPTIONS are:

[...]

-K, --tk include TCL/TK in the deployment.

You may make a try with this argument, and check the impact on your spec file. I bet it's an addition in the modules taken into account in Analysis or in the EXE function.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!