# install the libraries
pip install auto-py-to-exe
#start the gui-application
auto-py-to-exe
pyinstaller --onefile pythonScriptName.py
# executable is created in 'dist'-folder
import PyInstaller.__main__
PyInstaller.__main__.run([
'my_script.py',
'--onefile',
'--windowed'
])
#Is equivalent to: pyinstaller my_script.py --onefile --windowed