{
  "id": "python/pip-egg-info-failed-setup-py",
  "signature": "error: [Errno 2] No such file or directory: 'setup.py'\n\nERROR: Failed to build installable wheels for some pyproject.toml based projects (foo)",
  "signature_zh": "错误：[Errno 2] 没有那个文件或目录：'setup.py'\n\n错误：为某些基于 pyproject.toml 的项目（foo）构建可安装 wheel 失败",
  "regex": "error:\\ \\[Errno\\ 2\\]\\ No\\ such\\ file\\ or\\ directory:\\ 'setup\\.py'\\\n\\\nERROR:\\ Failed\\ to\\ build\\ installable\\ wheels\\ for\\ some\\ pyproject\\.toml\\ based\\ projects\\ \\(foo\\)",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "A build backend expects setup.py (legacy setuptools) but the package only has pyproject.toml, or the build backend is misconfigured to use setuptools.build_meta:__legacy__.",
  "root_cause_type": "generic",
  "root_cause_zh": "构建后端需要 setup.py（旧式 setuptools），但包只有 pyproject.toml，或者构建后端被错误配置为使用 setuptools.build_meta:__legacy__。",
  "versions": [
    {
      "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": "An empty setup.py does not declare metadata; the build produces an unusable package.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Isolation is not the issue; the backend cannot find the file it expects.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Fix the build-system table in pyproject.toml:\n  [build-system]\n  requires = [\"setuptools>=61\", \"wheel\"]\n  build-backend = \"setuptools.build_meta\"\n(Not __legacy__, which requires setup.py.)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "If you maintain the package, switch to a modern backend (hatchling, poetry-core, flit) that does not need setup.py.",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-02",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}