python package executable file Tutorial

python package executable file Tutorial

Installation Environment:

1, open a command line window, enter the command: pip install pyinstaller, wait for the download is complete. Example:
Here Insert Picture Description
2, after the download is complete, the test is successfully installed, enter the command: pyinstaller --version, if there is no report command does not exist, the installation was successful. Example:
Here Insert Picture Description

Packager Example:

1, create a file on your desktop called test.py, enter the following code in the file, and save and exit.
Here Insert Picture Description
2, desktop copy file path, enter the command in the command window: pyinstaller -F (route table) \ the test.py Example:
Here Insert Picture Description
Note: -F -f not written .
3, when you see a case that means packing success.
Here Insert Picture Description
4, into the folder, you can directly run the program generated. Or double-click to run the program.

Here Insert Picture Description

operation result:
Here Insert Picture Description

Guess you like

Origin www.cnblogs.com/zhicungaoyuan-mingzhi/p/12367706.html