{
  "id": "python/pip-check-broken-requirements",
  "signature": "package-a 1.0.0 requires package-b<2, but you have package-b 2.3.0 which is incompatible.",
  "signature_zh": "package-a 1.0.0 需要 package-b<2，但你已安装 package-b 2.3.0，不兼容。",
  "regex": "package\\-a\\ 1\\.0\\.0\\ requires\\ package\\-b<2,\\ but\\ you\\ have\\ package\\-b\\ 2\\.3\\.0\\ which\\ is\\ incompatible\\.",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "An existing package installed outside pip's resolver (e.g., via conda, apt, or a previous --no-deps install) violates a declared dependency constraint.",
  "root_cause_type": "generic",
  "root_cause_zh": "已安装的包（通过 conda、apt 或之前的 --no-deps 安装）违反了声明的依赖约束。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Runtime imports may resolve to the wrong version and fail with AttributeError or ImportError.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Force-reinstall may pull in conflicting transitive deps and break other packages in the same env.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Removes the package you need instead of resolving the conflict.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.92,
      "how": "Create a fresh venv and reinstall: python -m venv .venv && . .venv/bin/activate && pip install -r requirements.txt",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Pin the correct version: pip install 'package-b<2'",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "Audit with pip check and pipdeptree: pip install pipdeptree && pipdeptree --warn silence",
      "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-08-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}