# 错误：pip._vendor.packaging.requirements.InvalidRequirement：预期 ',' 或字符串结尾，但需求 'numpy; python_version<"3.8"' 中出现了 ';'

- **ID:** `python/pip-unsupported-format-version`
- **领域:** python
- **类别:** data_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

需求字符串使用分号表示环境标记，但语法错误或 packaging 版本太旧。

## 版本兼容性

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

## 解决方案

1. **Use proper syntax with environment markers** (95% 成功率)
   ```
   Write: 'numpy; python_version < "3.8"' (note space after semicolon and proper quoting).
   ```
2. **Upgrade packaging to support modern syntax** (90% 成功率)
   ```
   Run: pip install --upgrade packaging
   ```

## 无效尝试

- **Removing the semicolon and marker entirely** — Loses conditional installation logic. (70% 失败率)
- **Using double quotes inside the marker** — Syntax remains invalid; markers require proper quoting. (80% 失败率)
