Python py2exe all-in-one

跟風遠走 提交于 2021-02-04 18:39:30

问题


I'm very new to python, and I wanted to compile my code into a .exe for everyone to be able to use. I create the .exe without a problem, but instead of it being in an "all-in-one" sort of file, I get a folder that looks like this:

http://i.stack.imgur.com/gi2kK.png

I tried pygame2.exe (provided courtesy of pygame, since this game was made in pygame) but I get an error when I use the pre-made script from them (something about a build_exe error).

Anyways, is there a way that I can combine all of these files into a single exe? Thanks.


回答1:


Instructions are available here: http://www.py2exe.org/index.cgi/SingleFileExecutable

See example of Bundle Files in the end.



来源:https://stackoverflow.com/questions/5482155/python-py2exe-all-in-one

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