# ValueError：未知的分发选项：'long_description_content_type'

- **ID:** `python/setuptools-long-description-content-type-error`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

setup.py 使用了已安装的 setuptools 版本不识别的关键字参数（例如较旧的 setuptools）。

## 版本兼容性

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

## 解决方案

1. **Upgrade setuptools to a version that supports this option** (95% 成功率)
   ```
   `pip install --upgrade setuptools>=40.0`
   ```
2. **Use pyproject.toml to specify the content type** (90% 成功率)
   ```
   In pyproject.toml: `[project]
...
description = "..."
readme = "README.md"` (which implies content type)
   ```

## 无效尝试

- **Removing long_description_content_type entirely** — This may cause the long description to be rendered as plain text on PyPI, losing formatting. (40% 失败率)
- **Using a different name like 'content_type'** — The correct parameter name is 'long_description_content_type'; any other name is invalid. (80% 失败率)
