python data_error ai_generated true

ERROR: Cannot install pkg-a and pkg-b because these package versions have conflicting dependencies.

ID: python/pip-dependency-conflicts

Also available as: JSON · Markdown · 中文
80%Fix Rate
90%Confidence
0Evidence
2024-10-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.7 active
3.8 active
3.9 active

Root Cause

Two packages require incompatible versions of a shared dependency.

generic

中文

两个包需要共享依赖的不兼容版本。

Workarounds

  1. 90% success
    pip-compile requirements.in && pip install -r requirements.txt
  2. 85% success
    python -m venv venv1 && source venv1/bin/activate && pip install pkg-a

Dead Ends

Common approaches that don't work:

  1. 80% fail

    Doesn't resolve the underlying dependency conflict.

  2. 70% fail

    Will likely break one of the packages.