python config_error ai_generated true

ERROR: The user requested package==1.0 but package==2.0 is available on the extra index URL

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

Also available as: JSON · Markdown · 中文
80%Fix Rate
87%Confidence
0Evidence
2025-06-10First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.11 active

Root Cause

When using multiple indexes, pip may find a different version on an extra index and conflict with the specified version.

generic

中文

使用多个索引时,pip可能在额外索引上找到不同版本,与指定版本冲突。

Workarounds

  1. 85% success
    pip install --index-url https://main.index package==1.0
  2. 80% success
    pip install --extra-index-url https://extra.index package==1.0
  3. 90% success
    echo 'package==1.0' > constraints.txt && pip install -c constraints.txt package

Dead Ends

Common approaches that don't work:

  1. 60% fail

    May lose access to needed packages.

  2. 70% fail

    Disables all indexes, may not find package.

  3. 80% fail

    Doesn't resolve version conflict.