files = 1 with py2exe is not working

After some big frustration I did it! I converted my django app to an "exe" one to run as a single standalone app on windows (using cherrypy as a WSGI server) But When I try to to set py2exe's option "bundle_files" to "1" (ie bundle the python interpreter Python25.dll inside the generated exe) the generated exe crashes with a message talking about kernel32.dll

But when I use "bundle_file" = "2" , the generated exe is runing like a charm, but must -of course- have Python25.dll as a separate file beside it.

Anyone experienced a similar behavior, can you please tell me what I'm missing?

Thank you! :)


Maybe you can try pyinstaller instead.

I did have this problem before and didn't find a solution ever, but pyinstaller meets my need too and works perfectly.


this post talks all about using py2exe to get a single exe file.

py2exe - generate single executable file

If you post some code i'll take a look, and your error message will help to.


I also faced similar problem. But mine is with PyGTK. Simple program has no problem with it. Although there is no straight solution, there is an explanation provided here.

It says:

This is based on the Inno sample code in the py2exe distribution. It has worked successfully for a rather complicated PyGTK/Twisted app requiring extra data at runtime (GTK runtime data, GtkBuilder files, images, text data) that just wouldn't work with bundle_files .

链接地址: http://www.djcxy.com/p/38590.html

上一篇: Python GUI2Exe应用程序独立构建(使用Py2Exe)

下一篇: py2exe文件= 1不起作用