# 错误：无法打开需求文件：[Errno 2] 没有那个文件或目录：'requirements/base.txt'

- **ID:** `python/pip-req-file-not-found-relative`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

-r 路径相对于当前工作目录解析，而不是相对于包含 -r 行的文件。

## 版本兼容性

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

## 解决方案

1. **** (98% 成功率)
   ```
   cd /path/to/project
pip install -r requirements/base.txt
   ```
2. **** (95% 成功率)
   ```
   # requirements.txt at project root
-r requirements/base.txt
-r requirements/dev.txt
pip install -r requirements.txt
   ```

## 无效尝试

- **** — --no-index affects package lookup, not file resolution. (90% 失败率)
- **** — MANIFEST.in is for sdist contents, not for pip's requirements resolution. (85% 失败率)
- **** — Changes the base for resolution but may break other relative paths in the same file. (60% 失败率)
