Python: creating executables


Out of the box Python is an interpreted programming language.

One way to create an exe file from the standard Python py files is using PyInstaller.  (note: I am working with Python 3.5.  PyInstaller supports Python 3.  Py2exe – which also allows to make exe files – currently only supports Python 2.7)


  1. Download PyInstaller ( – documentation can also be found here)
  2. Install PyInstaller with the pip command:
    • Start Cmd
      Go to the folder containing (using CD FOLDERNAME)
    • Execute the pip command:
    • > pip install pyinstaller

Now package your py file with the command PyInstaller; for example:

> PyInstaller

The exe file will now be created under the dist folder.  You need all files in the dist folder containing the exe file.

Other examples:

> PyInstaller -F

Now Testapp.exe will also be created in the subfolder caller “dist” in a one-file bundled exe file.

> PyInstaller -F -w

This also creates a one-file bundled exe file, but does not show a console window; this is probably what you need when you create a GUI application.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s