{
  "id": "pip/req-uninstall-editables-only",
  "signature": "ERROR: Cannot uninstall requirement '<package>', not installed. It is only installed as an editable package.",
  "signature_zh": "错误：无法卸载要求 '<package>'，未安装。它仅作为可编辑包安装。",
  "regex": "ERROR: Cannot uninstall requirement '[^']+', not installed\\. It is only installed as an editable package\\.",
  "domain": "pip",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "Pip refuses to uninstall a package that was installed with `-e` (editable) mode when the user attempts to uninstall it with a non-editable specifier or a version mismatch.",
  "root_cause_type": "generic",
  "root_cause_zh": "当用户尝试使用非可编辑说明符或版本不匹配来卸载一个通过 `-e`（可编辑）模式安装的包时，pip 拒绝卸载。",
  "versions": [
    {
      "version": "pip 21.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 22.0.4",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 23.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The flag only affects dependency resolution, not the uninstall target itself; pip still checks if the package is installed as editable.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The editable install is a symlink or .pth file, not a full copy; deleting the directory leaves the .pth file, causing pip to still see the package as installed.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Reinstall the package in non-editable mode first, then uninstall: `pip install <package> --force-reinstall --no-deps` followed by `pip uninstall <package> -y`",
      "success_rate": 0.85,
      "how": "Reinstall the package in non-editable mode first, then uninstall: `pip install <package> --force-reinstall --no-deps` followed by `pip uninstall <package> -y`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use `pip uninstall <package> -y` with the exact editable path from `pip show <package>` (e.g., `pip uninstall -e /path/to/project`). Example: `pip uninstall -e /home/user/myproject`",
      "success_rate": 0.9,
      "how": "Use `pip uninstall <package> -y` with the exact editable path from `pip show <package>` (e.g., `pip uninstall -e /path/to/project`). Example: `pip uninstall -e /home/user/myproject`",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "首先以非可编辑模式重新安装包，然后卸载：`pip install <package> --force-reinstall --no-deps` 接着 `pip uninstall <package> -y`",
    "使用来自 `pip show <package>` 的确切可编辑路径运行 `pip uninstall <package> -y`（例如 `pip uninstall -e /home/user/myproject`）。示例：`pip uninstall -e /home/user/myproject`"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs",
  "official_doc_section": null,
  "error_code": "ERROR",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.78,
  "resolvable": "true",
  "first_seen": "2023-01-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}