Sometimes you need to write a good script to send to others, but in the absence of installation and operation environment or dependent libraries, Python scripts can not be executed. PyInstaller tool can quickly be packaged into exe python script to a binary executable program, and can rely on the relevant libraries and interpreters are packaged into a separate exe program. Of course, there are many similar PyInstaller tools, such as py2exe, cx_FreeZe and so on.
Installation tool
pip install PyInstaller
use
1, into the program files directory
2, performed directly pyinstaller 'python脚本文件'.py
or onefile parameter can be packaged into a single file exe file pyinstaller --onefile 'python脚本文件'.py
3 generated exe file folder located in dist
PyInstaller More Description: https://pyinstaller.readthedocs.io/en/stable/