{
  "id": "pip/dependency-conflict-with-extras-and-markers",
  "signature": "ERROR: Cannot install <package-a> and <package-b> because these package versions have conflicting dependencies. The conflict is caused by: <package-c> 1.0 depends on <package-d>!=2.0 and <package-e> 2.0 depends on <package-d>==2.0.",
  "signature_zh": "错误：无法安装 <package-a> 和 <package-b>，因为这些包的版本存在冲突的依赖关系。冲突由以下原因引起：<package-c> 1.0 依赖于 <package-d>!=2.0，而 <package-e> 2.0 依赖于 <package-d>==2.0。",
  "regex": "ERROR: Cannot install [^ ]+ and [^ ]+ because these package versions have conflicting dependencies\\. The conflict is caused by: [^ ]+ [^ ]+ depends on [^ ]+[^ ]+ and [^ ]+ [^ ]+ depends on [^ ]+[^ ]+\\.",
  "domain": "pip",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Two or more packages in the dependency tree require mutually exclusive versions of a shared dependency, creating an unsatisfiable constraint that pip's resolver cannot resolve.",
  "root_cause_type": "generic",
  "root_cause_zh": "依赖树中的两个或多个包要求共享依赖的互斥版本，创建了 pip 解析器无法解决的不可满足的约束。",
  "versions": [
    {
      "version": "pip 22.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 23.1.2",
      "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"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This flag skips dependency resolution entirely, but the installed packages may be broken at runtime due to missing or conflicting dependencies.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The `--no-deps` flag only prevents installation of dependencies for that specific package, but the conflict may still exist in the shared dependency tree; runtime errors are likely.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use a virtual environment and install compatible versions explicitly. Example: `pip install <package-c>==1.0 <package-e>==1.5` where versions are known to be compatible. Pin all dependencies in a requirements.txt file after testing.",
      "success_rate": 0.85,
      "how": "Use a virtual environment and install compatible versions explicitly. Example: `pip install <package-c>==1.0 <package-e>==1.5` where versions are known to be compatible. Pin all dependencies in a requirements.txt file after testing.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use `pip install <package-a> <package-b> --upgrade --upgrade-strategy eager` to force pip to upgrade all dependencies to the latest compatible versions, which may resolve the conflict.",
      "success_rate": 0.7,
      "how": "Use `pip install <package-a> <package-b> --upgrade --upgrade-strategy eager` to force pip to upgrade all dependencies to the latest compatible versions, which may resolve the conflict.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用虚拟环境并显式安装兼容版本。示例：`pip install <package-c>==1.0 <package-e>==1.5`，其中版本已知兼容。测试后在 requirements.txt 文件中固定所有依赖项。",
    "使用 `pip install <package-a> <package-b> --upgrade --upgrade-strategy eager` 强制 pip 将所有依赖项升级到最新的兼容版本，这可能会解决冲突。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pip.pypa.io/en/stable/topics/dependency-resolution/#dealing-with-dependency-conflicts",
  "official_doc_section": null,
  "error_code": "ERROR",
  "verification_tier": "ai_generated",
  "confidence": 0.89,
  "fix_success_rate": 0.82,
  "resolvable": "true",
  "first_seen": "2023-04-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}