Home >Backend Development >Python Tutorial >How to turn python program into software
I am new to python, and found that converting python programs into software is very troublesome. In order to facilitate everyone, I organized the resources myself and published the following tutorial.
Download the "pywin32" software, select the latest build folder, support the new version of python (recommended learning: Python video tutorial)
After downloading, install it. The corresponding version of python is required as support.
After the installation is completed, open cmd and enter "pip install pywin32". If the pywin32 program is old, you will be prompted. You enter the
"python -m pip install --upgrade pip" command to automatically update. After success, the following figure is shown:
Execute the "pip install pyinstaller" command, which will automatically download The latest version of pyinstaller, the screenshot is as follows:
Execute the "pyinstaller -F -w -i iconame.ico filename.py" command
Note: After testing "pyinstaller -F foo.py " is more feasible than the above command. The above command package program cannot be run
-F: Packaged into a single file
-w: Windows Program, do not display the command line window
-i: Allow the program icon
iconame.ico is your icon name
##filename .py is the py file you want to package
Note: This method needs to use the "cd drive letter:\file name" command to go to the corresponding drive letter for execution, otherwise it will default to Under "c:user\username", you need to put the icon and python program in the corresponding location.
For more Python-related technical articles, please visit thePython Tutorial column to learn!
The above is the detailed content of How to turn python program into software. For more information, please follow other related articles on the PHP Chinese website!