简体   繁体   English

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

[英]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.

相关问题 没有名为 pkg_resources.py2_warn pyinstaller 的模块 - no module named pkg_resources.py2_warn pyinstaller Python 错误:没有名为 pkg_resources 的模块 - Python Error : No module named pkg_resources pyinstaller 导入错误:没有名为 pkg_resources 的模块 - pyinstaller ImportError: No module named pkg_resources ModuleNotFoundError: 没有名为“pkg”的模块 - ModuleNotFoundError: No module named 'pkg' ModuleNotFoundError:在尝试 >Python manage.py makemigrations|python 3.7、django 2.1.7 时没有名为“DEGNet”的模块 - ModuleNotFoundError: No module named 'DEGNet' while attempting >Python manage.py makemigrations|python 3.7, django 2.1.7 Python Pip:没有名为 pkg_resources 的模块 - Python Pip: No module named pkg_resources Pyinstaller,如何在尝试将 py 文件转换为 .exe 时解决“ModuleNotFoundError: No module named 'cogs'”错误? - Pyinstaller,how to solve "ModuleNotFoundError: No module named 'cogs'" error while trying to convert py file to.exe? python manage.py runserver 错误:ModuleNotFoundError:没有名为“settings”的模块 - python manage.py runserver error : ModuleNotFoundError: No module named 'settings' Linux Mint 19上的Python3.7'No module named apt_pkg'错误 - Python3.7 'No module named apt_pkg' error on Linux Mint 19 使用 PyInstaller 将 python 3.7 脚本转换为 exe 时出错:ModuleNotFoundError - Error while converting python 3.7 script to exe using PyInstaller: ModuleNotFoundError
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM