python 项目打包 (pyinstaller)
步骤:1 安装pyinstaller -> 2 把第三方库的包复制到xxx.py同目录下 -> 3 pyinstaller -F 待打包文件名 (打包单个py文件) -> 4 check dist目录下生成的xxx.exe
1 install pyinstaller
pip install pyinstaller
2 第三方库
3 pyinstaller -F 待打包文件名 (打包单个py文件)
4 生成的.exe可执行文件
PS: 如果打包没问题,这个.exe是可以独立拿出去用的
issue 1: 打包过程没错误,执行.exe时遇到问题: no module named 'pkg_resources.py2_warn'
解决方法: ref: https://blog.csdn.net/slc1112/article/details/104234076
ref: https://blog.csdn.net/chenzhanhai/article/details/85334919
ref: https://www.cnblogs.com/it-tsz/p/10534654.html