# error: Setup script exited with error: Unsupported format: 2

- **ID:** `python/setuptools-unsupported-format`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

setup.py 使用了不支持的 setuptools 版本或格式，通常发生在 setuptools 版本过旧与新的 setup.py 语法不兼容时。

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.6 | active | — | — |
| 3.7 | active | — | — |
| 3.8 | active | — | — |

## Workarounds

1. **** (80% success)
   ```
   升级 setuptools：pip install --upgrade setuptools
   ```
2. **** (85% success)
   ```
   在 setup.py 开头添加 from setuptools import setup 并确保使用 setuptools 而不是 distutils
   ```

## Dead Ends

- **** — 问题在于 setuptools 版本，重试不会改变。 (90% fail)
- **** — 如果 setuptools 版本过旧，直接运行 setup.py 仍会失败。 (70% fail)
