{
  "id": "python/pip-cannot-uninstall-required-by",
  "signature": "ERROR: Cannot uninstall 'package_name'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.",
  "signature_zh": "错误：无法卸载 'package_name'。它是 distutils 安装的项目，因此我们无法准确确定哪些文件属于它，这会导致仅部分卸载。",
  "regex": "ERROR:\\ Cannot\\ uninstall\\ 'package_name'\\.\\ It\\ is\\ a\\ distutils\\ installed\\ project\\ and\\ thus\\ we\\ cannot\\ accurately\\ determine\\ which\\ files\\ belong\\ to\\ it\\ which\\ would\\ lead\\ to\\ only\\ a\\ partial\\ uninstall\\.",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The package was installed via distutils, and pip cannot safely uninstall it.",
  "root_cause_type": "generic",
  "root_cause_zh": "包是通过 distutils 安装的，pip 无法安全卸载。",
  "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"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Using --force to uninstall",
      "why_fails": "May leave broken files.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "Manually deleting files",
      "why_fails": "Risky and incomplete.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Reinstall the package with pip first",
      "success_rate": 0.8,
      "how": "pip install --force-reinstall package_name && pip uninstall package_name",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a virtual environment",
      "success_rate": 0.9,
      "how": "python -m venv newenv && source newenv/bin/activate && pip install package_name",
      "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.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-09-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}