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

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

## 根因

setuptools 弃用了直接调用 `setup.py install` 命令。它绕过 wheel 构建，产生不可复现的安装，并将被移除。当脚本或 Makefile 仍直接调用它时会触发。

## 版本兼容性

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

## 解决方案

1. **** (98% 成功率)
   ```
   pip install .
   ```
2. **** (97% 成功率)
   ```
   python -m build && pip install dist/*.whl
   ```
3. **** (95% 成功率)
   ```
   pip install -e .
   ```

## 无效尝试

- **** — Silences the warning but the command will be removed in a future setuptools release. (60% 失败率)
- **** — Pins to an ancient version, breaking compatibility with other tools. (70% 失败率)
