python 生成可执行文件步骤
1.首先写一个简单的python脚本
import time
if __name__ == '__main__':
print("hello world")
time.sleep(10)
2.安装PyInstaller
pip3 install pyinstaller
3.执行打包命令
pyinstaller test.py
错误:AttributeError: module ‘enum’ has no attribute ‘IntFlag’
卸载enum34库
pip uninstall enum34