wiki:create_selfcontained_python_script
This is an old revision of the document!
Table of Contents
Create self contained python script
Install
pip3 install pyinstaller
Go where your script is and execute
pyinstaller --onefile yourscript.py
You should get one file (named “yourscript”) that can be distributed to other Linux distros and run simply with
./yourscript
Hide console window
Pass –noconsole
option to pyinstaller
pyinstaller --onefile --noconsole yourscript.py
Tested on
- Xubuntu 18.04.4
- Windows 10 VM
See also
References
wiki/create_selfcontained_python_script.1611238849.txt.gz · Last modified: 2021/01/21 14:20 by antisa