{
  "id": "python/pip-cache-corruption-error",
  "signature": "ERROR: Can't determine which entry to delete from cache: ...",
  "signature_zh": "错误：无法确定要从缓存中删除哪个条目：...",
  "regex": "ERROR:\\ Can't\\ determine\\ which\\ entry\\ to\\ delete\\ from\\ cache:\\ \\.\\.\\.",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "The pip cache directory is corrupted, possibly due to concurrent pip processes or disk errors.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 缓存目录损坏，可能是由于并发 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"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Reinstalling pip with `pip install --upgrade pip`",
      "why_fails": "Reinstalling pip does not fix the cache; it only updates the pip executable.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Running pip with --no-cache-dir temporarily",
      "why_fails": "This bypasses the cache but does not fix the underlying corruption, which may affect other operations.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Clear the entire pip cache",
      "success_rate": 0.95,
      "how": "`pip cache purge` or manually delete the cache directory (e.g., `rm -rf ~/.cache/pip` on Linux/macOS or `%LocalAppData%\\pip\\cache` on Windows)",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a different cache directory",
      "success_rate": 0.85,
      "how": "Set `PIP_CACHE_DIR` environment variable to a new path: `export PIP_CACHE_DIR=/tmp/pipcache` then run pip.",
      "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.84,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-10-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}