# SetuptoolsDeprecationWarning：setup.py install 已弃用。请使用 build、pip 和其他基于标准的工具。

- **ID:** `python/pip-setuptools-deprecation-setup-py-install`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

setuptools 58+ 弃用了直接 `setup.py install` 路径，改用 PEP 517 构建后端；运行它仍可用，但会发出弃用警告并绕过 wheel 缓存。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## 解决方案

1. **** (96% 成功率)
   ```
   Replace `python setup.py install` with `python -m pip install .` or build a wheel first: `python -m pip install build && python -m build`.
   ```
2. **** (94% 成功率)
   ```
   For editable dev installs use `python -m pip install -e .` instead of `python setup.py develop`.
   ```

## 无效尝试

- **** — Only hides the warning; the deprecated code path still runs and will be removed in a future setuptools release. (70% 失败率)
- **** — Pins an old setuptools that lacks modern PEP 517/518 support and breaks other packages expecting current metadata APIs. (75% 失败率)
