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

Also available as: JSON · Markdown · 中文
80%Fix Rate
88%Confidence
0Evidence
2025-12-20First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
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

  1. 95% success
    pip install 'your-package @ git+https://github.com/org/repo.git@main'
  2. 90% success
    pip install 'git+https://github.com/org/repo.git@main#egg=your-package'

Dead Ends

Common approaches that don't work:

  1. 95% fail

    Trusted-host is unrelated to name detection.

  2. 90% fail

    pip still needs a name to record in metadata.

  3. 40% fail

    Works but loses VCS provenance and complicates updates; not a general fix for requirements files.