# error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

- **ID:** `python/pip-metadata-generation-failed-setup-py`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The package's setup.py/pyproject.toml raises during metadata generation, often due to missing build deps or incompatible setuptools.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   pip install -vvv foo
   ```
2. **** (85% success)
   ```
   pip install -U pip setuptools wheel
pip install foo
   ```

## Dead Ends

- **** — Cache is not the root cause; metadata generation still fails. (80% fail)
- **** — Pre-release may have the same broken metadata. (70% fail)
