# ERROR: Could not build wheels for <package>, which is required to install pyproject.toml-based projects

- **ID:** `python/pip-could-not-build-wheels-required-to-install-pyproject`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The package uses PEP 517 and pip must build a wheel, but the wheel build fails — typically due to missing C toolchain, missing headers (e.g., libssl-dev), or a compiler error in the C extension.

## Version Compatibility

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

## Workarounds

1. **** (80% success)
   ```
   # Debian/Ubuntu
sudo apt-get install -y build-essential python3-dev libssl-dev libffi-dev
# macOS
brew install openssl@3
pip install <package>
   ```
2. **** (75% success)
   ```
   pip install --only-binary=:all: <package>
# fallback: download from https://pypi.org/project/<package>/#files
   ```

## Dead Ends

- **** — Cache is not the issue; the compile step fails every time. (90% fail)
- **** — Pre-releases rarely ship wheels for every platform; the compile still fails. (80% fail)
