# packaging.requirements.InvalidRequirement：预期结束或分号（在版本说明符之后）
    foo >= 1.0 < 2.0
        ~~~~^

- **ID:** `python/setuptools-invalid-version-specifier`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

版本约束组合了两个运算符而未使用逗号，例如 '>= 1.0 < 2.0'。PEP 440 要求说明符之间使用逗号。

## 版本兼容性

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

## 解决方案

1. **** (99% 成功率)
   ```
   # bad
foo >= 1.0 < 2.0
# good
foo>=1.0,<2.0
   ```
2. **** (95% 成功率)
   ```
   # equivalent to >=1.0,<2.0 for a 1.x series
foo~=1.0
   ```

## 无效尝试

- **** — Quoting does not change the grammar the parser enforces. (90% 失败率)
- **** — Older packaging also rejects the same malformed specifier. (85% 失败率)
