This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!
pyinstaller
¶
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.
Prerequisite(s)
Table of contents¶
Install¶
Warning
Try to not use $ pip install ...
system wide. Prefer your system package manager instead, or
pip
+venv
(see pip
and venv
).
Tip
If $ pip insall ...
is needed outside a venv
: then use the --user
flag.
Use¶
Package your Python program into a single executable file with the following command:
Troubleshooting¶
If you encounter the following error:
Then the missing module might be hidden, re try like so:
If this cheat sheet has been useful to you, then please consider leaving a star here.