python
config_error
ai_generated
true
错误:找不到满足 -r base.txt 要求的版本(可用版本:无) 错误:找不到与 -r base.txt 匹配的分发包
ERROR: Could not find a version that satisfies the requirement -r base.txt (from versions: none) ERROR: No matching distribution found for -r base.txt
ID: python/pip-recursive-requirements-loop
80%修复率
87%置信度
0证据数
2025-09-14首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
某个 requirements 文件通过 `-r` 包含自身,形成无限包含循环,pip 将其报告为名为 `-r base.txt` 的缺失包。
English
A requirements file includes itself via `-r`, creating an infinite inclusion loop that pip reports as a missing package named `-r base.txt`.
解决方案
-
98% 成功率
Remove the `-r base.txt` line from base.txt itself; only include base.txt from other files.
-
85% 成功率
pip install pipdeptree && pipdeptree --warn silence # or use `pip-compile` which detects loops
无效尝试
常见但无效的做法:
-
95% 失败
The error is in requirements file inclusion, not dependency resolution.
-
90% 失败
The loop is in user configuration; pip behavior is correct.
-
80% 失败
Removes shared dependencies and breaks other requirements files that include it.