# 警告：requirements文件中存在重复条目：第3行numpy==1.21.0和第5行numpy==1.22.0

- **ID:** `python/pip-requirements-duplicate-entry`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

requirements文件中同一包列出了不同版本，导致歧义。

## 版本兼容性

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

## 解决方案

1. **Remove duplicate and keep only one version** (95% 成功率)
   ```
   # Edit requirements.txt to keep only one line
numpy==1.22.0
   ```
2. **Use pip-compile to resolve dependencies automatically** (90% 成功率)
   ```
   pip install pip-tools
pip-compile requirements.in
   ```

## 无效尝试

- **Keeping both entries** — Pip will use the last occurrence, which may not be intended. (50% 失败率)
- **Ignoring the warning** — May install unexpected version; conflicts later. (60% 失败率)
