How to generate exe files in python: first install pyinstaller, the code is [pip install pyinstaller]; then use the pyinstaller command to package it into exe [pyinstaller -F --icon=my.ico..].
The operating environment of this tutorial: Windows 7 system, python version 3.9, DELL G3 computer.
How to generate exe files in python:
1. Install pyinstaller
pip install pyinstaller
2. Use pyinstaller command
pyinstaller -F --icon=my.ico test.py
#Package into exe, and set the icon
pyinstaller -F -w yourfilename.py
#Package into exe, and Does not include the console
Other parameters:
Generally, python GUI programming only uses packaging into exe, which is not as reasonable as .net Winform is easy to use
Related free learning recommendations:python video tutorial
The above is the detailed content of How python generates exe files. For more information, please follow other related articles on the PHP Chinese website!