Procedural steps for packaging Python programs into executable applications
Today we recommend you an important library in Python - pyinstaller, this library has an important role in team project development to improve development efficiency, so focused python developers must know how to use it.
So what is pyinstaller? pyinstaller is a very useful python packaging tool that can package python scripts into an exe executable file in Windows environment, and the various third-party libraries that the scripts depend on are handled together in a unified way when packaging, so that the packaged exe file can be executed on computers without these libraries installed, or even on computers without any python environment installed.
Here we will explain how to install and use pyinstaller to complete the packaging of our python program
1 Install pyinstaller
In the previous section we talked about how to install Anaconda, based on the development platform already installed in the previous section, first open the AnacondaPrompt command window and use the following command to install pyinstaller
pip install pyinstaller
2 pyinstaller.exe to package the xxx.py file
Once the pyinstaller library is installed, we need to package our XXX.py file into a XXX.exe file, by executing the following command.
pyinstaller.exe -F xxx.py