python3.x: Package for exe execution file (Window System) under Window System release: First, install Pyinstaller (Pyinstaller 3.3.1)
CMD installation command:
Pip Install Pyinstaller
Second, Python program packaging (without parameters)
File naming specification: Python files that do not support Chinese commands;
Path: The suggested path does not have a Chinese directory;
Command: Pyinstaller-f file name (with suffix py)
# command syntax: Pyinstaller-f file name (with suffix py) # Common parameter Description: # –icon= icon Path # - F package into an EXE file # -W Use window, no console # -C Using the console, no Windows # -D Create a directory containing EXE and some other dependent files # pyinstaller-h to view the parameters # switch the cmd directory to (command: CD file path (note space)) needs to be packaged in the Py file directory:pyinstaller-f shjys_rjjqk.py
Third, view the build file
1, return to the target file directory, found in the directory generated. spec file Shjys_rjjqk.spec:
2, packaged exe file, in the same directory of the Dist file (three folders generated altogether):
Iv. Pyinstaller Change the icon to generate EXE program
# My.ico is an icon name, and the current shjys_rjjqk.py file is in the same directory pyinstaller-f--icon=my.ico shjys_rjjqk.py
Integrated Man
Links:http://www.cnblogs.com/lizm166/p/8315468.html
Source: Blog Park
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.
python3.x: Package as exe execution file (Window System)