python整个项目打包成一个exe程序
#已安装python环境
一、安装PyInstaller 模块
pip install pyinstaller
运行上面命令,应该看到如下输出结果:
Successfully installed pyinstaller-x.x.x
其中的 x.x.x 代表 PyInstaller 的版本
pyinstaller打包程序exe踩过的坑
1.提示:TypeError: an integer is required (got type bytes) 解决方法如下:
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz
2.然后会出现另外一个异常 AttributeError: module ‘enum’ has no attribute ‘IntFlag’? 解决办法如下:
这可能是由包Enum34引起的。因为Python3.4有一个标准库枚举模块,所以您应该卸载Enum34,因为在Python3.6中添加了Enum.Intflag,所以它不再与标准库中的枚举兼容。
#卸载enum3