python
module_error
ai_generated
true
ModuleNotFoundError: No module named 'setuptools'
ID: python/setuptools-module-not-found
80%Fix Rate
90%Confidence
0Evidence
2024-02-10First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
Root Cause
setuptools is not installed in the current Python environment, often in fresh virtualenvs or minimal Docker images.
generic中文
当前 Python 环境中未安装 setuptools,通常出现在新的 virtualenv 或最小化 Docker 镜像中。
Workarounds
-
98% success
Install setuptools: `pip install setuptools`.
-
90% success
For Python 3.12+, use `python -m ensurepip --upgrade` to bootstrap pip and setuptools.
Dead Ends
Common approaches that don't work:
-
95% fail
Overkill; setuptools is a separate package.
-
90% fail
Does not install setuptools.