PyInstaller

Another option to building exe's for Windows and also support for creating distributions for Mac and Linux is to use Pyinstaller

To install this, first download the pyinstaller package, and unzip this to any location you like, for me I installed this under C:\Learn\Pyinstaller.

To build an exe for the hello.py:

for i in range(25):
   print "Hello World "+str(i+1)

To build an exe, the first step is to create a spec file as shown below:

c:\python25\python.exe c:\learn\pyinstaller\Makespec.py hello.py

To build the exe use the spec file as shown below:

c:\python25\python.exe c:\learn\pyinstaller\Build.py hello.spec

This creates a dist folder with all files to run hello.exe, there is an option –onefile passed to the Makespec.py to make a single hello.exe file.


pyinsaller.txt · Last modified: 2014/10/26 01:52 (external edit)
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0