# 弃用警告：旧式 setup.py install 已弃用。pip 24.0 将强制执行此行为变更。请改用 pip install .

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

## 根因

某个包或脚本直接调用了旧式 `setup.py install` 命令，而 pip 已弃用它，转而采用 PEP 517 构建后端。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   Add a pyproject.toml with [build-system] requires = ['setuptools>=61', 'wheel'] and build-backend = 'setuptools.build_meta'. Then install with pip install .
   ```
2. **** (85% 成功率)
   ```
   In CI, use pip<24 with a TODO to migrate; track the offending package and open an upstream issue.
   ```

## 无效尝试

- **** — Hides the warning but does not change the deprecated behavior; future pip versions will error. (80% 失败率)
- **** — Temporary and insecure; breaks other tooling expecting modern pip. (75% 失败率)
- **** — Does not change the deprecated code path being executed. (82% 失败率)
