Skip to content

This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!


pyinstaller bundles a Python application and all its dependencies into a single package. The user can run the packaged app without installing a Python interpreter or any modules. pyinstaller supports Python 3.6 or newer, and correctly bundles the major Python packages such as numpy, pyqt, and others.


Table of contents



Try to not use $ pip install ... system wide. Prefer your system package manager instead, or pip+venv (see pip and venv).


If $ pip insall ... is needed outside a venv: then use the --user flag.

$ pip install pyinstaller
$ poetry add --dev pyinstaller



Package your Python program into a single executable file with the following command:

$ pyinstaller --clean --onefile


If you encounter the following error:

ModuleNotFoundError: No module named 'epics.clibs'

Then the missing module might be hidden, re try like so:

$ pyinstaller --clean --onefile --hidden-import epics.clibs

If this cheat sheet has been useful to you, then please consider leaving a star here.