{
  "id": "pip/dependency-conflicts-with-extras",
  "signature": "ERROR: Cannot install package-a[extra1] and package-b[extra2] because these package versions have conflicting dependencies on common-dep (package-a[extra1] requires common-dep>=2.0, package-b[extra2] requires common-dep<2.0).",
  "signature_zh": "错误：无法安装 package-a[extra1] 和 package-b[extra2]，因为这些包版本对 common-dep 有冲突的依赖关系（package-a[extra1] 需要 common-dep>=2.0，package-b[extra2] 需要 common-dep<2.0）。",
  "regex": "ERROR: Cannot install [^ ]+ and [^ ]+ because these package versions have conflicting dependencies on [^ ]+ \\([^)]+\\)\\.",
  "domain": "pip",
  "category": "resolver_error",
  "subcategory": null,
  "root_cause": "Two packages with extras specified have incompatible version constraints on a shared dependency, and pip's resolver cannot find a version of common-dep that satisfies both simultaneously.",
  "root_cause_type": "generic",
  "root_cause_zh": "两个带有 extras 指定的包对共享依赖项具有不兼容的版本约束，pip 的解析器无法找到同时满足两者的 common-dep 版本。",
  "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": "Without dependencies, the packages may fail to import or function correctly.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "If the constraints are exclusive (e.g., >=2.0 and <2.0), no single version exists, so pinning fails.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Install the packages without extras that cause the conflict: pip install package-a package-b",
      "success_rate": 0.7,
      "how": "Install the packages without extras that cause the conflict: pip install package-a package-b",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a virtual environment with different Python versions or package versions: python3.10 -m venv venv && source venv/bin/activate && pip install package-a[extra1] && pip install package-b[extra2]",
      "success_rate": 0.6,
      "how": "Use a virtual environment with different Python versions or package versions: python3.10 -m venv venv && source venv/bin/activate && pip install package-a[extra1] && pip install package-b[extra2]",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check if one of the extras is unnecessary; if so, omit it. For example, if extra2 is optional, install package-b without it: pip install package-a[extra1] package-b",
      "success_rate": 0.8,
      "how": "Check if one of the extras is unnecessary; if so, omit it. For example, if extra2 is optional, install package-b without it: pip install package-a[extra1] package-b",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "安装不带导致冲突的 extras 的包：pip install package-a package-b",
    "使用不同 Python 版本或包版本的虚拟环境：python3.10 -m venv venv && source venv/bin/activate && pip install package-a[extra1] && pip install package-b[extra2]",
    "检查其中一个 extras 是否不必要；如果是，省略它。例如，如果 extra2 是可选的，安装不带它的 package-b：pip install package-a[extra1] package-b"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pip.pypa.io/en/stable/topics/dependency-resolution/",
  "official_doc_section": null,
  "error_code": "ERROR",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.78,
  "resolvable": "partial",
  "first_seen": "2024-03-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}