python
module_error
ai_generated
true
ModuleNotFoundError:没有名为 'setuptools' 的模块
ModuleNotFoundError: No module named 'setuptools'
ID: python/setuptools-module-not-found
80%修复率
90%置信度
0证据数
2024-02-10首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
当前 Python 环境中未安装 setuptools,通常出现在新的 virtualenv 或最小化 Docker 镜像中。
English
setuptools is not installed in the current Python environment, often in fresh virtualenvs or minimal Docker images.
解决方案
-
98% 成功率
Install setuptools: `pip install setuptools`.
-
90% 成功率
For Python 3.12+, use `python -m ensurepip --upgrade` to bootstrap pip and setuptools.
无效尝试
常见但无效的做法:
-
95% 失败
Overkill; setuptools is a separate package.
-
90% 失败
Does not install setuptools.