How to create a single executable of a Python program

kyosohma at kyosohma at
Wed Jul 25 15:11:47 CEST 2007

On Jul 25, 6:38 am, Ali <aafs... at> wrote:
> On Jul 25, 7:34 am, NicolasG <nicol... at> wrote:
> > Dear fellows,
> > I'm trying to create a executable file using py2exe . Unfortunately
> > along with the python executable file it also creates some other files
> > that are needed in order to the executable be able to run in a system
> > that doesn't have Python installed. Can some one guide me on how can I
> > merge all this files created by py2exe in a single exe file ? If I
> > have a python program that uses an image file I don't want this image
> > file to be exposed in the folder but only to be accessible through the
> > program flow..
> > Regards,
> > Nicolas.
> Hi,
> I know this is not exactly what you asked for, but if you want a
> single exe installer, then take a look at something like Inno Setup.
> It will package all that stuff into a single exe which Windows users
> seem happy to click-and-install.
> I blogged the process I use here:
> (though this has some PyGTK specifics)
> Ali

I've been using GUI2Exe, which is a GUI interface to py2exe. Anyway,
with it, I've been able to reduce the number of files it compiles down
to 3. The main executable, MSVCR71.dll and w9xpopen.exe. Then I use
Inno Setup to create an installer executable. Inno can determine if
any of the dlls you include are already installed and if not, install
them for you.

Gui2exe can be found here:

Hope that helps.


More information about the Python-list mailing list