xxxxxxxxxx
# install the libraries
pip install auto-py-to-exe
#start the gui-application
auto-py-to-exe
xxxxxxxxxx
import PyInstaller.__main__
PyInstaller.__main__.run([
'my_script.py',
'--onefile',
'--windowed'
])
#Is equivalent to: pyinstaller my_script.py --onefile --windowed
xxxxxxxxxx
pyinstaller --onefile pythonScriptName.py
# executable is created in 'dist'-folder
xxxxxxxxxx
'''
Assuming you want to run the file like this: ./script.py
use the shebang (#!)
and tell the location of the interpreter
example:
1) #!/path/to/project/venv/bin/python (if using virtual env)
2) #!/usr/bin/env python
'''