python
install_error
ai_generated
true
ERROR: Could not build wheels for foo, which is required to install pyproject.toml-based projects ModuleNotFoundError: No module named 'setuptools'
ID: python/pip-build-backend-missing-setuptools-legacy
80%Fix Rate
84%Confidence
0Evidence
2024-09-18First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.8+ | active | — | — | — |
Root Cause
The isolated build environment for the package lacks setuptools. This happens when the build backend is setuptools but build isolation cannot fetch it, or when running in an environment where setuptools was uninstalled.
generic中文
包的隔离构建环境缺少 setuptools。当构建后端为 setuptools 但构建隔离无法获取它,或在 setuptools 被卸载的环境中运行时发生。
Workarounds
-
90% success
python -m pip install --upgrade setuptools wheel python -m pip install foo
-
85% success
python -m pip install --upgrade setuptools wheel python -m pip install --no-build-isolation foo
Dead Ends
Common approaches that don't work:
-
70% fail
Runs the build in the current env; if setuptools isn't installed there either, same error. Also risks version skew.
-
90% fail
You cannot interact with pip's ephemeral isolated build env; it is torn down automatically.