将Python文件编译成exe可执行文件,可以使用pyinstaller工具或py2exe工具实现。这里使用pyinstaller来讲明。web
pyinstaller
py2exe
pip install pyinstaller
pyinstaller -F xxx.py
dist