Question:
How do you make a python file into an executable file?
jacob
2016-06-10 12:39:23 UTC
Hey guys,

So basically I made a python code in python idle on the newest version. I would like to distribute the code to some of my friends and so they can just double click on the executable to run the program.

How do I make a python file into an executable file?
Three answers:
husoski
2016-06-10 13:45:24 UTC
The usual way that Python-based applications are delivered is to package a directory that includes a private Python installation and a short executable in another language (maybe a batch or shell script) that launches the private python executable to run your application.



The rationale behind the private installation is that the user doesn't have to know how to install the correct version of Python in order to install your application; and you get the confidence that the proper version will be used. That cuts down on a lot of tech support problems.



There's a tool called Py2Exe that will do all of this for you, bundling everything it thinks you might need into one large .exe file (this is for Windows only afaik). The down side is that it takes a bit of playing to get the contents right, and the results tend to be very large files

http://py2exe.org/
anonymous
2016-06-10 13:24:06 UTC
You need a python compiler.
Zack
2016-06-11 07:33:53 UTC
py2exe


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...