# SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.

- **ID:** `python/setuptools-deprecated-use-of-setup-py`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The user invoked `python setup.py install` (or a tool that does) instead of using pip/build. Modern setuptools warns and will eventually remove this path.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Replace `python setup.py install` with:
  python -m pip install .
For editable installs:
  python -m pip install -e .
For building distributions:
  python -m build
   ```
2. **** (85% success)
   ```
   If you maintain the package, migrate metadata from setup.py to pyproject.toml [project] table and keep setup.py only as a shim.
   ```

## Dead Ends

- **** — Hides the symptom but the legacy path is still used and will break in future setuptools releases. (70% fail)
- **** — Downgrading setuptools breaks other packages that require modern setuptools for PEP 517/518 builds. (85% fail)
