Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!
I'm learning python language over a month. Everything is going smoothly. But curious mind wants to know, how do I make an .exe file for windows using python?
Posted

You don't.

Python is interpreted by the Python runtime, when you type "python myscript.py" it converts it into bytecode (pyc) and then runs it in the background. This has to happen each time you run a python script, so whoever you give the script to runs it just like you would.

I haven't found any native image generators for python, since Python requires the runtime to be installed on the client system.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 29-Dec-13 12:20pm    
Basically it is correct, but I know at least one open-source product which produces Windows executable files, please see my answer. I vaguely remember I heard of something else but did not try anything...
—SA
Unlike Ron, the author of Solution 1, I know at least one product used to produce executable files for Windows, called py2exe:
http://en.wikipedia.org/wiki/Py2exe[^],
http://www.py2exe.org/[^].

Good luck,
—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900