与tkinter一起使用py2exe来创建一个独立的.exe
问题描述:
我有一个tkinter创建的GUI的计算器程序。我要打包到这一个GUI,但在命令提示符下使用与tkinter一起使用py2exe来创建一个独立的.exe
py -3.4 -m py2exe.build_exe calc_gui.pyw -p tkinter -b 0
,我得到得到错误信息:
The following modules require a minimum of bundle_files option,
otherwise they will not work (currently bundle_files is set to 0):
tkinter: 2
Please change the bundle_files option and run the build again.
Build failed
我在想,如果有办法,我可以打包到这使用py2exe作为使用-b 2或3的作品精细单个.exe,但他们不产生独立的.exe的
顺便说一句,这是在Python 3(这是由py2exe支持)
答
更改build_bundle option to one
。这将把它捆绑成一个文件。
+0
错误是说tkinter需要将它设置为2作为最小值。我通过最终使用nuitka解决了这个问题 –
+0
@SovietKetchup好的工作 –
您是否尝试过错误信息告诉您要做什么? –
然后它不是捆绑到一个单一的exe文件中,它周围大约有8个文件。 –