[英]Pyinstaller Error: ModuleNotFoundError: No module named 'pkg_resources.py2_warn' for Python 3.7
Using Pyinstaller on Python 3.7 with setuptools around ver 45.0.0 produces the error在 Python 3.7 上使用 Pyinstaller 和 45.0.0 版左右的 setuptools 会产生错误
ModuleNotFoundError: No module named 'pkg_resources.py2_warn' [24514] Failed to execute script pyi_rth_pkgres
ModuleNotFoundError:没有名为“pkg_resources.py2_warn”的模块 [24514] 无法执行脚本 pyi_rth_pkgres
This discussion describes it as being caused by the setuptools update around 45.0.0此讨论将其描述为由45.0.0 左右的 setuptools 更新引起
This was fixed in the 49.1.1 version of setuptools released a week ago on 7/10/2020.此问题已在一周前 2020 年 7 月 10 日发布的 setuptools 49.1.1 版本中得到修复。 So, upgrading setuptools now fixes the issue.
因此,升级 setuptools 现在解决了这个问题。 The previous workaround was to downgrade setuptools.
以前的解决方法是降级 setuptools。
For Win10:对于 Win10:
pip install setuptools --upgrade
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.