{
  "id": "python/pip-requirement-already-satisfied-but-wrong-version",
  "signature": "ERROR: Cannot uninstall 'numpy'. 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": "错误：无法卸载 'numpy'。它是通过 distutils 安装的项目，因此我们无法准确判断哪些文件属于它，这会导致仅部分卸载。",
  "regex": "ERROR:\\ Cannot\\ uninstall\\ 'numpy'\\.\\ 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 by the OS package manager (apt/dnf) or an old distutils path, so pip has no RECORD file to drive a clean uninstall.",
  "root_cause_type": "generic",
  "root_cause_zh": "该包由操作系统包管理器（apt/dnf）或旧式 distutils 路径安装，因此 pip 没有 RECORD 文件来执行干净的卸载。",
  "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": "Leaves two overlapping copies in site-packages; imports become order-dependent and hard to debug.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The distutils guard still triggers; sudo does not create a RECORD file.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Remove the OS-managed copy first: `sudo apt-get remove python3-numpy` (or `dnf remove python3-numpy`), then `pip install numpy` inside a venv.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.93,
      "how": "Work in a fresh venv that does not inherit system site-packages: `python -m venv --system-site-packages=false .venv`.",
      "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.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-08-22",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}