python
config_error
ai_generated
true
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%Fix Rate
87%Confidence
0Evidence
2025-09-14First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
Root Cause
A requirements file includes itself via `-r`, creating an infinite inclusion loop that pip reports as a missing package named `-r base.txt`.
generic中文
某个 requirements 文件通过 `-r` 包含自身,形成无限包含循环,pip 将其报告为名为 `-r base.txt` 的缺失包。
Workarounds
-
98% success
Remove the `-r base.txt` line from base.txt itself; only include base.txt from other files.
-
85% success
pip install pipdeptree && pipdeptree --warn silence # or use `pip-compile` which detects loops
Dead Ends
Common approaches that don't work:
-
95% fail
The error is in requirements file inclusion, not dependency resolution.
-
90% fail
The loop is in user configuration; pip behavior is correct.
-
80% fail
Removes shared dependencies and breaks other requirements files that include it.