Py2exe: reduce library archive size

I just created my first py2exe executable and noticed that with the EXE a ZIP file is created with a size of about 1.4 MB.

My question is: can I reduce the size of this or was it expected that the typical size of the EXE generated with py2exe would be ~ 4 MB (this means that all the files are: python2.6dll, library.zip)

+6
python py2exe
source share
2 answers

The short answer to the question about downsizing is yes. A long answer that I am not going to provide here, but instead direct you to the py2exe OptimizingSize wiki page.

I hope this helps;)

+7
source share

After changing these setup.py parameters, I also run UPX in the DLL and executables and repack library.zip with 7-zip, it works fine.

By the way, there is a wiki page about using UPX and 7-zip.

+3
source share

All Articles