[Tutor] how to use freeze for making executable python file in linux

Alan Gauld alan.gauld at btinternet.com
Thu Jan 31 09:46:34 CET 2008

"brindly sujith" <brindly at gmail.com> wrote

> can i use freeze to make my python program 
> into executable in linux

Since you have picked up on Freeze I'll assume Luke was 
right and that you don't really want to make your program 
executable but that you want to create a self contained file
that can be distributed without the need for the Python 
interpreter to already exist. Is that the case?

If so its quite unusual on Linux since most Linux distros 
include Python as standard. Can you clarify why you think 
this will be needed? It will bring several disadvantages 
including a) wasted disk space since you will be packaging 
Python with your program even for users who already have it,
b) limiting the use to one platform since the freeze version 
will only work on the platform you create it on, whereas python 
files wuill runon any machine with Python installed (assuming 
no non-portable code), c) maintenance becomes harder since 
you have to remember to refreeze the code after every bug fix etc.
And then you have to ship/install a whole new package instead of 
a single fixed python file.

There are valid reasons for doing this but these's a whole 
bunch of reasons not to as well...

Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list