# usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'bdist_wheel'

- **ID:** `python/setuptools-invalid-command-bdist-wheel`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The `wheel` package is not installed in the build environment, so setuptools does not register the `bdist_wheel` command used to build wheels.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Install wheel into the build environment: `pip install wheel` (or `pip install --upgrade setuptools wheel`), then retry the build.
   ```
2. **** (90% success)
   ```
   Use `python -m build` which manages build dependencies via pyproject.toml's `[build-system] requires`.
   ```

## Dead Ends

- **** — Bypasses the wheel build but installs an unmanaged egg and often fails on modern pip/setuptools. (70% fail)
- **** — Still requires bdist_wheel and does not install the missing wheel package. (75% fail)
