python
install_error
ai_generated
true
error: command 'gcc' failed: No such file or directory
ID: python/setuptools-command-not-found
80%Fix Rate
90%Confidence
0Evidence
2024-01-20First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.10 | active | — | — | — |
Root Cause
When building a Python package with C extensions, setuptools tries to invoke the C compiler, but gcc is not installed or not in PATH.
generic中文
当构建带有C扩展的Python包时,setuptools尝试调用C编译器,但gcc未安装或不在PATH中。
Workarounds
-
95% success
apt-get install build-essential (Debian/Ubuntu) or yum install gcc (RHEL)
-
80% success
pip install --only-binary :all: package
-
70% success
export CC='clang' if clang is available
Dead Ends
Common approaches that don't work:
-
100% fail
Still fails because the compiler doesn't exist.
-
70% fail
Skips isolation but still needs a compiler.
-
60% fail
Headers are not enough; compiler binary is required.