{
  "id": "python/setuptools-entry-points-collision",
  "signature": "pkg_resources.ContextualVersionConflict: (foo 1.0 (/venv/lib/python3.11/site-packages), Requirement.parse('foo>=2.0'), {'bar'})",
  "signature_zh": "pkg_resources.ContextualVersionConflict: (foo 1.0 (/venv/lib/python3.11/site-packages), Requirement.parse('foo>=2.0'), {'bar'})",
  "regex": "pkg_resources\\.ContextualVersionConflict:\\ \\(foo\\ 1\\.0\\ \\(/venv/lib/python3\\.11/site\\-packages\\),\\ Requirement\\.parse\\('foo>=2\\.0'\\),\\ \\{'bar'\\}\\)",
  "domain": "python",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "A plugin/entry point consumer (`bar`) requires foo>=2.0, but an older foo is activated in the same working set, so pkg_resources raises a conflict when resolving entry points.",
  "root_cause_type": "generic",
  "root_cause_zh": "某个插件/入口点消费者（`bar`）要求 foo>=2.0，但同一工作集中激活的是旧版 foo，因此 pkg_resources 在解析入口点时抛出冲突。",
  "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": "Does not affect the already-running process's working set.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "pkg_resources reads installed distributions, not just sys.path.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Upgrade foo in the same environment and restart the process: `pip install --upgrade 'foo>=2.0'`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "Isolate plugins per environment so entry points resolve against one consistent set of distributions.",
      "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.84,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2024-06-17",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}