# RuntimeError: 表单数据需要安装"python-multipart"。

- **ID:** `python/fastapi-form-data-requires-python-multipart`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

使用Form(...)或File(...)但未安装python-multipart包。

## 版本兼容性

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

## 解决方案

1. **** (99% 成功率)
   ```
   pip install python-multipart
   ```
2. **** (97% 成功率)
   ```
   echo 'python-multipart>=0.0.9' >> requirements.txt
   ```

## 无效尝试

- **** — If the client sends form-encoded data, FastAPI still needs multipart to parse it. (70% 失败率)
- **** — Wrong package name; FastAPI imports python_multipart. (90% 失败率)
