{
  "id": "python/setuptools-pkg-resources-version-conflict",
  "signature": "pkg_resources.VersionConflict: (setuptools 58.0.0 (/usr/lib/python3/dist-packages), Requirement.parse('setuptools>=60.0.0'))",
  "signature_zh": "pkg_resources.VersionConflict：(setuptools 58.0.0 (/usr/lib/python3/dist-packages)，需要 setuptools>=60.0.0)",
  "regex": "pkg_resources\\.VersionConflict:\\ \\(setuptools\\ 58\\.0\\.0\\ \\(/usr/lib/python3/dist\\-packages\\),\\ Requirement\\.parse\\('setuptools>=60\\.0\\.0'\\)\\)",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A package requires a newer version of setuptools than the system-installed one, often due to system package manager restrictions.",
  "root_cause_type": "generic",
  "root_cause_zh": "某个包需要比系统安装的更新版本的 setuptools，通常是由于系统包管理器的限制。",
  "versions": [
    {
      "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"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Upgrading setuptools with `pip install --upgrade setuptools` without using --user",
      "why_fails": "System-managed packages may be in a protected directory, causing permission errors or being overridden by apt/yum.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Ignoring the version conflict and continuing",
      "why_fails": "The package may fail at runtime due to missing APIs or functions only available in newer setuptools.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Install a compatible version of setuptools in user space",
      "success_rate": 0.85,
      "how": "`pip install --user --upgrade setuptools`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Create a virtual environment with an updated setuptools",
      "success_rate": 0.95,
      "how": "`python -m venv myenv && source myenv/bin/activate && pip install --upgrade setuptools`",
      "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-03-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}