This article describes solutions to create a single executable file containing a Python application/script and the Python interpreter DLL with all necessary libraries. The executable file can then be launched on any system even if Python is not installed.

Existing solutions:

Useful additional tools:

  • PyBuilder, a GUI to simplify the use of py2exe on Windows: http://pybuilder.sourceforge.net/
  • InnoSetup, to build a complete installer for Windows: http://www.jrsoftware.org/isinfo.php
  • NSIS, another installer builder: http://nsis.sourceforge.net

Tutorials:

  • http://bytes.com/topic/python/insights/580045-simple-guide-using-py2exe
  • http://bytes.com/topic/python/insights/615261-py2exe-setup-file-wxpython-runs-any-ide-excludes-tkinter
  • http://bytes.com/topic/python/insights/579554-simple-guide-using-pyinstaller

Alternatives:

  • py2cc, a Python to C compiler: http://alexey.sudachen.name/opensource.shtml
  • Shed Skin, a Python to C++ compiler: http://shed-skin.blogspot.com/

 

This page was created on the 04/03/2009, last edit 08/12/2011.

To be continued...