Write an exe program using python

step1 Download pyinstaller link address http://www.pyinstaller.org/downloads.html

The result of opening the address is as shown above, and step2 is installed;

step2: install pyinstaller

Unzip the file and copy the path where setup.py is located in the pyinstaller folder

Open the win command line cmd window and enter the address path you just copied

Execute the command python setup.py install

Quietly smoke a cigarette until I see finished processing dependencies for ...

step3: use

cmd enters the py script directory that needs to be packaged into an exe program

Execute the command pyinstaller -F hello.py

Finally, a dist folder will be generated in the same level directory of hello.py

Open and you will see

I excitedly opened the hello.exe window and it flashed, not what I wanted!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325086579&siteId=291194637