python
install_error
ai_generated
true
ERROR: Could not detect requirement name for 'git+https://github.com/org/repo.git@main', please specify one with #egg=your_package_name
ID: python/pip-git-url-without-egg-fragment
80%Fix Rate
88%Confidence
0Evidence
2025-12-20First 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
pip cannot infer the distribution name from a raw VCS URL without the legacy `#egg=` fragment or a PEP 508 name prefix.
generic中文
pip 无法从没有旧式 `#egg=` 片段或 PEP 508 名称前缀的原始 VCS URL 推断出分发包名称。
Workarounds
-
95% success
pip install 'your-package @ git+https://github.com/org/repo.git@main'
-
90% success
pip install 'git+https://github.com/org/repo.git@main#egg=your-package'
Dead Ends
Common approaches that don't work:
-
95% fail
Trusted-host is unrelated to name detection.
-
90% fail
pip still needs a name to record in metadata.
-
40% fail
Works but loses VCS provenance and complicates updates; not a general fix for requirements files.