Run PyInstaller
Compile hello.py to hello.exe
pyinstaller hello.pyCompile into one standalone executable file
pyinstaller hello.py --onefileIncorporate version file to executable file
pyinstaller hello.py --onefile --version-file=version.txtMake icon of executable file
pyinstaller hello.py --onefile --version-file=version.txt -i icon.icoIf pyinstaller is not in $PATH environment variable, you may try the following command to import package directly.
python3 -m pyinstaller hello.pyor
python3 -m PyInstaller hello.pyExample:
pyinstaller -w -F -i molecule.ico -n OctaDist-2.3.beta-Win-x86-64 --version-file=version-2.3.beta.txt main.py1. use python with importing Pyinstaller
/where/you/install/anaconda3/bin/python3.6 -m PyInstaller hello.py2. If you install PyInstaller on local directory (in your home) using Anaconda's python, pyinstaller is installed in the hidden directory.
For example, /home/rangsiman/.local/bin/pyinstaller
Use the following command to make an executable file
/home/rangsiman/.local/bin/pyinstaller hello.pyRangsiman Ketkaew