Home >Backend Development >Python Tutorial >How to turn python program into software

How to turn python program into software

(*-*)浩
(*-*)浩Original
2019-06-24 14:12:0611241browse

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.

How to turn python program into software

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:

How to turn python program into softwareExecute the "pip install pyinstaller" command, which will automatically download The latest version of pyinstaller, the screenshot is as follows:

How to turn python program into softwareExecute 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 the

Python 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn