{
  "id": "python/pip-cannot-uninstall",
  "signature": "ERROR: Cannot uninstall 'pkg'. 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": "错误：无法卸载 'pkg'。它是 distutils 安装的项目，因此我们无法准确确定哪些文件属于它，这会导致部分卸载。",
  "regex": "ERROR:\\ Cannot\\ uninstall\\ 'pkg'\\.\\ 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": "system_error",
  "subcategory": null,
  "root_cause": "The package was installed with distutils (or old setup.py install), and pip cannot track its files for clean removal.",
  "root_cause_type": "generic",
  "root_cause_zh": "该包是使用 distutils（或旧的 setup.py install）安装的，pip 无法跟踪其文件以进行干净卸载。",
  "versions": [
    {
      "version": "3.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.6",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Pip doesn't have a --force uninstall; it will still fail.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Risky and may leave residual files.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.8,
      "how": "pip install --ignore-installed pkg",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.7,
      "how": "rm -rf /path/to/site-packages/pkg* /path/to/site-packages/pkg-*.egg-info",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-09-02",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}