Convert .py to .exe with Source Code

In this article, you’ll learn how to convert .py to .exe file format using a simple graphical interface and PyInstaller in Python.

Prerequisites:

  1. Python Basics
  2. auto-py-to-exe module

Install Necessary Modules:

Open your  Prompt  and type and run the following command (individually):

pip install auto-py-to-exe


Convert .py to .exe file format

.py to .exe converter using a simple graphical interface and PyInstaller in Python.

Pre-requisites

Python : 3.5-3.9

To have the interface displayed in the images, you will need chrome. If chrome is not installed or –no-chrome is supplied, the default browser will be used.

Note: As of PyInstaller 4.0, Python 2.7 is no longer supported. Read Python 2.7 Support below for steps on how to use this tool with Python 2.7.

Open your Anaconda Command Promt and type:

pip install auto-py-to-exe

Then to run it, execute the following in the terminal:

auto-py-to-exe

Using the Application

  • At first you will see empty console
  • Select your script location (paste in or use a file explorer)
    • Outline will become blue when file exists
  • Select other options and add things like an other files and output location
  • Click the big blue button at the bottom to convert
  • Find your converted files in /output when completed

Leave a Comment