{
  "id": "pip/dependency-conflict-with-marker",
  "signature": "ERROR: Cannot install package-a 1.0 and package-b 2.0 because these package versions have conflicting dependencies. The conflict is caused by: package-a 1.0 depends on package-c>=3.0; python_version < '3.9' and package-b 2.0 depends on package-c<3.0; python_version >= '3.9'",
  "signature_zh": "错误：无法安装 package-a 1.0 和 package-b 2.0，因为这些包版本有冲突的依赖。冲突由以下原因引起：package-a 1.0 依赖于 package-c>=3.0; python_version < '3.9'，而 package-b 2.0 依赖于 package-c<3.0; python_version >= '3.9'",
  "regex": "ERROR: Cannot install.*?and.*?because these package versions have conflicting dependencies.*The conflict is caused by:.*depends on.*?;.*python_version.*?and.*?depends on.*?;.*python_version",
  "domain": "pip",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "Pip's resolver detects a dependency conflict between two packages due to environment markers (e.g., python_version) that create mutually exclusive version requirements for a shared dependency, making resolution impossible for the current Python version.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 的解析器检测到两个包之间由于环境标记（如 python_version）导致的依赖冲突，这些标记对共享依赖形成了互斥的版本要求，使得在当前 Python 版本下无法解析。",
  "versions": [
    {
      "version": "pip 23.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 24.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Using pip install --upgrade --force-reinstall does not resolve the logical conflict; it only reinstalls packages without changing version constraints.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Setting PIP_REQUIRE_VIRTUALENV has no effect on dependency resolution logic.",
      "fail_rate": 0.98,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Running pip install --no-deps package-a package-b installs both without dependencies but leaves them broken at runtime due to missing or wrong versions of package-c.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Install a version of package-a or package-b that does not trigger the marker conflict: pip install 'package-a<1.0' 'package-b==2.0' (adjust versions based on resolver output).",
      "success_rate": 0.85,
      "how": "Install a version of package-a or package-b that does not trigger the marker conflict: pip install 'package-a<1.0' 'package-b==2.0' (adjust versions based on resolver output).",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a different Python version that satisfies one of the marker conditions: pyenv install 3.8 && pyenv local 3.8 && pip install package-a package-b",
      "success_rate": 0.8,
      "how": "Use a different Python version that satisfies one of the marker conditions: pyenv install 3.8 && pyenv local 3.8 && pip install package-a package-b",
      "condition": "",
      "sources": []
    },
    {
      "action": "Pin package-c to a version that satisfies both markers (if possible): pip install 'package-c>=3.0,<3.0' (note: this may not exist; otherwise use a range that works for both).",
      "success_rate": 0.7,
      "how": "Pin package-c to a version that satisfies both markers (if possible): pip install 'package-c>=3.0,<3.0' (note: this may not exist; otherwise use a range that works for both).",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Install a version of package-a or package-b that does not trigger the marker conflict: pip install 'package-a<1.0' 'package-b==2.0' (adjust versions based on resolver output).",
    "Use a different Python version that satisfies one of the marker conditions: pyenv install 3.8 && pyenv local 3.8 && pip install package-a package-b",
    "Pin package-c to a version that satisfies both markers (if possible): pip install 'package-c>=3.0,<3.0' (note: this may not exist; otherwise use a range that works for both)."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pip.pypa.io/en/stable/topics/dependency-resolution/#dependency-conflicts",
  "official_doc_section": null,
  "error_code": "ERROR",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2024-05-22",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}