abhijeet
abhijeet

Reputation: 479

python windows standalone exe file

whenever i build python file to exe file from py2exe, it takes lots of space of minimum 25MB for small project also,it includes all the the python library file. Is there any other way that i can reduce the size.

Upvotes: 1

Views: 1187

Answers (4)

Ryan Ginstrom
Ryan Ginstrom

Reputation: 14121

py2exe tends to err on the side of caution. You can manually exclude some libraries with the exclude list option in order to reduce the size of the file.

In my experience, you should be able to compress down to a ~9 MB installer (Inno) if you include wxPython or another GUI framework, ~7 MB if you ship a console app or use tkinter.

Upvotes: 0

ghostdog74
ghostdog74

Reputation: 342353

You should have read the documentation before using. Here's a page you can read

Upvotes: 6

nosklo
nosklo

Reputation: 222852

Python programs need python to run. All py2exe does is to include full python and all libraries you use together with your script in a single file.

Upvotes: 3

Florian Mayer
Florian Mayer

Reputation: 3081

No, not really; you need Python shipped with the exe so that it is standalone. It it not common to create exe Files from Python projects, anyway.

Upvotes: -2

Related Questions