# ERROR: Could not build wheels for somepkg, which is required to install pyproject.toml-based projects
  error: subprocess-exited-with-error
  × Building wheel for somepkg (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      gcc: error: unrecognized command-line option '-mavx2'

- **ID:** `python/pip-wheel-not-supported-platform`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

No prebuilt wheel exists for the target platform/Python combo, so pip falls back to building from source, and the local toolchain (gcc/clang) does not support the required flags or lacks headers.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (85% success)
   ```
   Install build deps: apt-get install -y build-essential python3-dev (or xcode-select --install on macOS)
   ```
2. **** (80% success)
   ```
   Upgrade the compiler: on macOS 'brew install gcc' and set CC=gcc-13; on Linux use a newer distro or toolchain
   ```
3. **** (75% success)
   ```
   Use a prebuilt manylinux wheel from a different index: pip install --only-binary=:all: --extra-index-url https://download.pytorch.org/whl/cpu somepkg
   ```

## Dead Ends

- **** — Forces source builds for everything, making the failure more likely and slower. (90% fail)
- **** — Disables isolation but the compiler still lacks the required flags/headers. (85% fail)
- **** — The build failure is deterministic; retries produce the same compiler error. (95% fail)
