# 错误：无法识别选项 --use-2to3
用法：setup.py [global_opts] cmd1 [cmd1_opts]

- **ID:** `python/setuptools-option-use-2to3-removed`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

setuptools 移除了 2to3 构建选项（2018 年起弃用，setuptools 58 移除）。向 setup() 传入 use_2to3=True 的旧 setup.py 现在会失败。

## 版本兼容性

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

## 解决方案

1. **** (80% 成功率)
   ```
   pip install 'setuptools<58' wheel
pip install <old-package> --no-build-isolation
   ```
2. **** (70% 成功率)
   ```
   # edit setup.py: remove use_2to3=True
# then
pip install . --no-build-isolation
   ```
3. **** (65% 成功率)
   ```
   pip index versions <alternative-package>
pip install <maintained-fork>
   ```

## 无效尝试

- **** — Latest setuptools still has no 2to3 support. (90% 失败率)
- **** — The option was removed from setuptools, not just pip. (85% 失败率)
- **** — Sometimes there is no newer release; the package is abandoned. (60% 失败率)
