Installation PyInstaller
pip3 install pyinstaller
View pyinstaller --version version
Use PyInstaller
pyinstaller --help to see all usage
The simplest usage, execute commands in the same directory and test.py: pyinstaller test.py
Then see the new addition of two directories build and dist, dist following file is an executable file that can be published, for the above command you will find the dist directory under a pile of papers, all kinds of dynamic libraries are executable and myscrip file. Sometimes it feels too much trouble, you need to package all dist following things to post, in case of losing a dynamic library will not run, but fortunately pyInstaller support single file mode, only you need to do:
pyinstaller -F test.py
Here you will find dist only one executable file, this single file can be released, it can be run under a similar system operating system you are using.
Reproduced in: https: //www.jianshu.com/p/f01e8df3f62a