我正在使用pyinstaller从python脚本中创建一个.exe,它输出的效果很好,但是在尝试执行时出现此错误。
File "PyInstaller/loader/rthooks/pyi_rth_pkgres.py", line 13, in <module>
File "/home/arturo/.local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.__dict__)
File "pkg_resources/__init__.py", line 86, in <module>
ModuleNotFoundError: No module named 'pkg_resources.py2_warn'
[25405] Failed to execute script pyi_rth_pkgres
我已经准备好重新安装setuptools。
答案 0 :(得分:10)
感谢您的解决方案。它适用于Windows 10 / python 3.7.2:
pip uninstall pyinstaller
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
答案 1 :(得分:4)