python network_error ai_generated true

ERROR: Cannot find a version of package that satisfies the requirement package==1.2.3 (from versions: none) ERROR: No matching distribution found for package==1.2.3

ID: python/pip-conflicting-extra-index-url

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

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.x active — — —

Root Cause

An --extra-index-url points to a private index that does not host the requested package/version, and pip does not fall back to PyPI for that name.

generic

中文

--extra-index-url 指向不托管所请求包/版本的私有索引,且 pip 不会为该包名回退到 PyPI。

Workarounds

  1. 88% success
    Use both indexes explicitly: pip install --index-url https://pypi.org/simple --extra-index-url https://private.example.com/simple package
  2. 85% success
    Verify the private index hosts the version: curl -s https://private.example.com/simple/package/ | grep 1.2.3
  3. 90% success
    Publish the missing version to the private index or pin to a version it hosts

Dead Ends

Common approaches that don't work:

  1. 90% fail

    Trusted-host only affects TLS verification; the package is simply absent from the index.

  2. 80% fail

    Replacing the index removes PyPI access entirely, so public deps also fail.

  3. 95% fail

    The package is not present in the index; retries do not change availability.