Create an executable from your python program

Kevin Tewouda
10 min readDec 19, 2023
Photo by Lalit Kumar on Unsplash

One thing notable when working with Python is that it is not easy to install and run a program written in this programming language on a random computer. This is normal since it is an interpreted language, so we need to have an interpreter program (the most known is CPython, remember that many other Python implementations like PyPy exist) installed on the target machine where we want to run the program.

But in this article, I will present two projects solving this issue with a different approach: pyinstaller and nuitka.

Installation

Pyinstaller starts working with Python 3.8 and Nuitka still supports Python 2 projects!

$ pip install pyinstaller nuitka

# with poetry
$ poetry add pysinstaller nuitka -G dev

If you don’t know poetry, I have a nice introduction here.

You may have an incompatibility error when installing pyinstaller with poetry. This is because pyinstaller narrowed the version of Python you can install with an upper constraint forbidding a Python version not…

--

--

Kevin Tewouda
Kevin Tewouda

Written by Kevin Tewouda

Déserteur camerounais résidant désormais en France. Passionné de programmation, sport, de cinéma et mangas. J’écris en français et en anglais dû à mes origines.

Responses (3)