记-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

posted @ 2020-06-24 13:24  leon-chan  阅读(372)  评论(0编辑  收藏  举报