# error: Setup script exited with error: command 'gcc' failed: No such file or directory

- **ID:** `python/setuptools-command-not-found-error`
- **Domain:** python
- **Category:** system_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A Python package with C extensions requires a C compiler (like gcc) which is not installed on the system.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.9 | active | — | — |
| 3.10 | active | — | — |

## Workarounds

1. **Install C compiler and Python development headers** (90% success)
   ```
   On Ubuntu/Debian: `sudo apt-get install build-essential python3-dev`. On CentOS/RHEL: `sudo yum install gcc python3-devel`
   ```
2. **Use a pre-built wheel if available** (75% success)
   ```
   `pip install --only-binary=:all: <package_name>` or find a wheel from PyPI or an alternative index.
   ```

## Dead Ends

- **Installing gcc but not the required development headers (python3-dev)** — Without Python headers, gcc cannot find necessary include files like Python.h (60% fail)
- **Using `pip install --no-build-isolation` alone** — This flag only disables build isolation, but gcc is still needed for compilation. (80% fail)
