# 错误：无效要求：'foo==1.0.0' 提示：看起来像路径。文件 'foo==1.0.0' 不存在。

- **ID:** `python/pip-invalid-requirement-no-matching-distribution`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

由于引号或 shell 展开问题，pip 将参数解析为本地路径，或者要求字符串包含无效字符。

## 版本兼容性

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

## 解决方案

1. **** (92% 成功率)
   ```
   Quote the requirement: `pip install 'foo==1.0.0'` (single quotes on Unix).
   ```
2. **** (80% 成功率)
   ```
   Check for stray spaces or shell globbing; use `--` separator: `pip install -- foo==1.0.0`.
   ```

## 无效尝试

- **** — The user intended to install a package, not reference a file. (90% 失败率)
- **** — Does not fix parsing of the requirement. (80% 失败率)
