Pyinstaller错误:ModuleNotFoundError:对于Python 3.7,没有名为“ pkg_resources.py2_warn”的模块

时间:2020-07-17 03:48:25

标签: python pyinstaller setuptools

在Python 3.7上使用Pyinstaller并在45.0.0版附近使用setuptools会产生错误

ModuleNotFoundError:没有名为'pkg_resources.py2_warn'的模块[24514]无法执行脚本pyi_rth_pkgres

discussion描述它是由 setuptools更新约45.0.0

引起的

1 个答案:

答案 0 :(得分:1)

这是一周前于2020年7月10日发布的setuptools的49.1.1版本中的fixed。因此,升级setuptools现在可以解决此问题。先前的解决方法是降级setuptools。

对于Win10:

pip install setuptools --upgrade