python
module_error
ai_generated
true
ModuleNotFoundError: No module named 'setuptools'
ID: python/setuptools-package-not-found
80%Fix Rate
85%Confidence
0Evidence
2024-09-15First 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.
generic中文
当前 Python 环境中未安装 setuptools。
Workarounds
-
95% success Install setuptools using pip for the current Python
python -m pip install setuptools
-
90% success Ensure the virtual environment is activated
source venv/bin/activate && pip install setuptools
Dead Ends
Common approaches that don't work:
-
Installing setuptools with conda in a pip-only environment
70% fail
Conda and pip environments are separate; conda install may not affect pip's Python.
-
Using python -m pip install setuptools but without activating the correct venv
80% fail
If the wrong Python is used, setuptools may install elsewhere.