How can I make an EXE file from a Python program?


I've used several modules to make EXEs for Python, but I'm not sure if I'm doing it right.

How should I go about this, and why? Please base your answers on personal experience, and provide references where necessary.

6/23/2014 1:55:04 PM

Accepted Answer

Auto PY to EXE - A .py to .exe converter using a simple graphical interface built using Eel and PyInstaller in Python.

py2exe is probably what you want, but it only works on Windows.
PyInstaller works on Windows and Linux.
Py2app works on the Mac.

6/22/2019 11:08:27 AM

I found this presentation to be very helpfull.

How I Distribute Python applications on Windows - py2exe & InnoSetup

From the site:

There are many deployment options for Python code. I'll share what has worked well for me on Windows, packaging command line tools and services using py2exe and InnoSetup. I'll demonstrate a simple build script which creates windows binaries and an InnoSetup installer in one step. In addition, I'll go over common errors which come up when using py2exe and hints on troubleshooting them. This is a short talk, so there will be a follow-up Open Space session to share experience and help each other solve distribution problems.

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow