{
  "id": "python/pip-resolver-conflict-incompatible",
  "signature": "ERROR: Cannot install foo==1.0 and bar==2.0 because these package versions have conflicting dependencies. The conflict is caused by: foo 1.0 depends on baz<2; bar 2.0 depends on baz>=2",
  "signature_zh": "错误：无法安装 foo==1.0 和 bar==2.0，因为这些包版本的依赖存在冲突。冲突原因：foo 1.0 依赖 baz<2；bar 2.0 依赖 baz>=2",
  "regex": "ERROR:\\ Cannot\\ install\\ foo==1\\.0\\ and\\ bar==2\\.0\\ because\\ these\\ package\\ versions\\ have\\ conflicting\\ dependencies\\.\\ The\\ conflict\\ is\\ caused\\ by:\\ foo\\ 1\\.0\\ depends\\ on\\ baz<2;\\ bar\\ 2\\.0\\ depends\\ on\\ baz>=2",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The new pip resolver (pip >= 20.3) performs full backtracking and detects that no single set of versions satisfies all constraints. Two dependencies require mutually exclusive ranges of a shared package.",
  "root_cause_type": "generic",
  "root_cause_zh": "新版 pip 解析器（pip >= 20.3）执行完整回溯，发现没有任何一组版本能同时满足所有约束。两个依赖对同一个共享包要求互斥的版本范围。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The legacy resolver just picks one arbitrarily and installs an inconsistent environment that breaks at runtime with ImportError or AttributeError.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Skips dependency installation entirely, leaving baz missing or at the wrong version so imports fail.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.85,
      "how": "pip install 'foo<1.0' 'bar>=2'  # try ranges\n# or use pip-tools to resolve:\npip install pip-tools\npip-compile requirements.in",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.75,
      "how": "python -m venv venv_foo && venv_foo/bin/pip install foo\npython -m venv venv_bar && venv_bar/bin/pip install bar\n# call via subprocess from a coordinating process",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}