{
  "id": "python/pip-egg-info-directory-error",
  "signature": "ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/path/to/package.egg-info/PKG-INFO'",
  "signature_zh": "错误：由于环境错误无法安装包：[Errno 2] 没有这样的文件或目录：'/path/to/package.egg-info/PKG-INFO'",
  "regex": "ERROR:\\ Could\\ not\\ install\\ packages\\ due\\ to\\ an\\ EnvironmentError:\\ \\[Errno\\ 2\\]\\ No\\ such\\ file\\ or\\ directory:\\ '/path/to/package\\.egg\\-info/PKG\\-INFO'",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The package's egg-info directory is missing or corrupted, often due to an interrupted build or manual deletion, causing pip to fail during metadata extraction.",
  "root_cause_type": "generic",
  "root_cause_zh": "包的 egg-info 目录缺失或损坏，通常由于构建中断或手动删除导致，使 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"
    },
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Reinstalling with --no-cache-dir",
      "why_fails": "The cache is not the issue; the egg-info is missing from the source, so cache clearing doesn't help.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Running pip install as root",
      "why_fails": "Permission changes don't recreate missing egg-info files; the problem persists regardless of user privileges.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Rebuild the package from source to regenerate egg-info",
      "success_rate": 0.85,
      "how": "pip install --no-build-isolation --no-cache-dir --force-reinstall /path/to/package",
      "condition": "",
      "sources": []
    },
    {
      "action": "Manually create the egg-info directory if missing",
      "success_rate": 0.75,
      "how": "mkdir -p /path/to/package.egg-info && touch /path/to/package.egg-info/PKG-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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}