{
  "id": "python/pip-egg-info-missing-metadata",
  "signature": "ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '.../egg-info/PKG-INFO'",
  "signature_zh": "错误：由于环境错误，无法安装包：找不到文件或目录：'.../egg-info/PKG-INFO'",
  "regex": "ERROR:\\ Could\\ not\\ install\\ packages\\ due\\ to\\ an\\ EnvironmentError:\\ \\[Errno\\ 2\\]\\ No\\ such\\ file\\ or\\ directory:\\ '\\.\\.\\./egg\\-info/PKG\\-INFO'",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The package's setup.py or setup.cfg references egg-info metadata that was not generated, often due to a missing setup() call or incorrect build backend configuration.",
  "root_cause_type": "generic",
  "root_cause_zh": "包的setup.py或setup.cfg引用了未生成的egg-info元数据，通常是由于缺少setup()调用或构建后端配置错误。",
  "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": "pip will overwrite or ignore manually created files, and the underlying metadata generation process is still broken.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This bypasses isolated build environments but doesn't fix the fundamental setup.py issue; the error persists if setup.py is malformed.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "If the build backend doesn't regenerate it properly due to configuration errors, deletion alone won't solve the problem.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Ensure setup.py has a proper setup() call: `python setup.py egg_info` to pre-generate metadata, then pip install .",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Switch to pyproject.toml with setuptools.build_meta: `[build-system] requires = [\"setuptools\"] build-backend = \"setuptools.build_meta\"` and run pip install .",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.75,
      "how": "Clean rebuild: `rm -rf *.egg-info build dist && pip install --no-cache-dir .`",
      "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": []
}