python package file into an executable file exe

Recently wrote a small program that needs to be packaged exe, gave the following brief you on how to use pyinstaller exe package program to program.

First, you need to install this application pip look, this has been said in previous articles, please learn from windows and linux have windows and linux.

The second step, after installed pip, pip install pyinstaller enter cmd in the command window that can install on pyinstaller, then the next step is to introduce a few instructions on pyinstaller:
-w command
directly issued exe applications with command line debugger window , was added in the instruction command can -w shield;
-F command
attention command is case-sensitive. Here it is capitalized. -F instruction files can be packaged into a separate application exe file, or a tape and various dependency dll file folder;
-p instruction
This instruction may be added later pyinstaller path search module. Because many modules packaged applications involved. Here you can add your own path. But after I tested, are under the directory site-packages can be identified, it does not need to be added manually.
So usually use -F command syntax is: pyinstaller -F (python program name) .py

 

Tested successfully executed! !

Guess you like

Origin www.cnblogs.com/bcyczhhb/p/11113469.html