记-python安装PyInstaller
python3.7可以通过https://pypi.tuna.tsinghua.edu.cn/simple/pyinstaller/下载3.6版本的PyInstaller压缩包后,解压到本地文件中,然后,通过python setup.py install 安装PyInstaller
在打包结束后,exe文件会闪退,说明,打包程序是有错误存在的
一般是由于setuptools版本问题导致
Pyinstaller No module named pkg_resources.py2_warn
解决方式为:
1.pip install setuptools==44.0.0 降级
2.在生成的xxx.spec文件中找到修改 hiddenimports=['pkg_resources.py2_warn'] 在命令行执行 PyInstaller -D xxx.spec