python:standalone-python-app
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
python:standalone-python-app [2023/01/29 11:23] – removed Wulf Rajek | python:standalone-python-app [2023/05/29 11:55] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Standalone Python app ====== | ||
+ | |||
+ | 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 2.7 and Python 3.5+, and correctly bundles the major Python packages such as numpy, PyQt, Django, wxPython, and others. | ||
+ | |||
+ | PyInstaller is tested against Windows, Mac OS X, and GNU/Linux. However, it is not a cross-compiler: | ||
+ | |||
+ | https:// | ||
+ | |||
+ | PyInstaller Quickstart: | ||
+ | Install PyInstaller from PyPI: | ||
+ | < | ||
+ | python -m pip install --upgrade pip | ||
+ | pip install [other required modules] | ||
+ | pip install pyinstaller | ||
+ | </ | ||
+ | Go to your program’s directory and run: | ||
+ | < | ||
+ | pyinstaller yourprogram.py | ||
+ | </ | ||
+ | This will generate the bundle in a subdirectory called dist. | ||
+ | |||
+ | To create a single standalone binary file of any python script from command prompt use: | ||
+ | < | ||
+ | pyinstaller.exe -F pythonscript.py | ||
+ | </ | ||
+ | The resulting single binary file will be in the subdirectory dist. | ||
python/standalone-python-app.1674991409.txt.gz · Last modified: 2023/05/29 11:53 (external edit)