# 错误：无效的要求：'package==1.0+local'（来自 requirements.txt 第 1 行）

- **ID:** `python/pip-install-error-local-version-identifier`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

要求指定了本地版本标识符（例如 1.0+local），除非包来自本地索引或直接 URL，否则在 requirements 文件中不允许使用。

## 版本兼容性

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

## 解决方案

1. **** (85% 成功率)
   ```
   Specify the package with a direct URL: package @ https://example.com/package-1.0+local.tar.gz.
   ```
2. **** (80% 成功率)
   ```
   Use a local index: pip install --index-url file:///path/to/index package==1.0+local.
   ```

## 无效尝试

- **** — May install a different version than intended, causing compatibility issues. (70% 失败率)
- **** — Does not affect local version identifiers; still invalid. (90% 失败率)
