First, install Pyinstaller using PIP command installation: Pip install Pyinstaller
Second, the use of Pyinstaller
1. Pyinstaller packaging method installed using download and installation
Place the files that need to be packaged in the extracted Pyinstaller folder, open the cmd window, switch the path to the current path, open the command prompt, and enter the following (the last file name):
- Python pyinstaller.py-f myfile.py
2. Pyinstaller packaging method installed with Pip method
Open the cmd window, switch the path to the path where the file is located (wherever the file is placed) open a command prompt, enter the following (the last file name):
3, the meaning of input parameters
- -F means a single executable file is generated
- -W indicates that the console window is removed, which is useful in GUI interfaces. But if it is a command-line program, then remove this option!
- -P means you customize the classpath that you need to load, and you don't normally use
- -I represents an icon for an executable file
Python packaging Method--pyinstaller (Python3)