# mypkg setup 命令错误：'python_requires' 必须是包含有效版本说明符的字符串；无效说明符：'>=3.7.*'

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

## 根因

python_requires 字段使用了不是有效 PEP 440 说明符的通配符模式；通配符仅允许作为 '==' 或 '!=' 前缀。

## 版本兼容性

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

## 解决方案

1. **** (98% 成功率)
   ```
   python_requires='>=3.7,<4'
   ```
2. **** (95% 成功率)
   ```
   python_requires='>=3.7,!=3.7.0'
   ```

## 无效尝试

- **** — Quoting does not change PEP 440 validation; the specifier is still invalid. (90% 失败率)
- **** — Allows installation on unsupported interpreters, leading to runtime SyntaxErrors. (50% 失败率)
- **** — Older setuptools may accept it, but modern pip rejects the metadata during install. (70% 失败率)
