Creating single EXE using py2exe for a Tkinter program

后端 未结 1 1779
执念已碎
执念已碎 2021-01-01 18:12

I\'m trying to use minty\'s solution provided on this link to generate a single exe file for my Tkinter based program:

py2exe - generate single executable file

1条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 18:20

    Thanks to this link, you have to edit site-packages/py2exe/build_exe.py and add "tcl85.dll" and "tk85.dll" to the dlls_in_exedir list. This will get it to run, although you'll still have the tcl folders, and those two dlls will be there along-side the exe. But it's way better than bundle_files=3.

            self.dlls_in_exedir = [python_dll,
                                   "w9xpopen%s.exe" % (is_debug_build and "_d" or ""),
                                   "msvcr71%s.dll" % (is_debug_build and "d" or ""),
                                   "tcl85.dll",
                                   "tk85.dll"]
    

    0 讨论(0)
提交回复
热议问题