{
  "id": "python/pip-metadata-generation-failed",
  "signature": "ERROR: Exception:\nTraceback (most recent call last):\n  File \"/tmp/pip-build-env-.../overlay/lib/python3.11/site-packages/setuptools/build_meta.py\", line 317, in get_requires_for_build_wheel\n    return self._get_build_requires(config_settings, requirements=[])\n...\nModuleNotFoundError: No module named 'setuptools'",
  "signature_zh": "错误：异常：\n回溯（最近一次调用最后）：\n  文件 \"/tmp/pip-build-env-.../overlay/lib/python3.11/site-packages/setuptools/build_meta.py\"，第 317 行，在 get_requires_for_build_wheel 中\n    return self._get_build_requires(config_settings, requirements=[])\n...\nModuleNotFoundError：没有名为 'setuptools' 的模块",
  "regex": "ERROR:\\ Exception:\\\nTraceback\\ \\(most\\ recent\\ call\\ last\\):\\\n\\ \\ File\\ \"/tmp/pip\\-build\\-env\\-\\.\\.\\./overlay/lib/python3\\.11/site\\-packages/setuptools/build_meta\\.py\",\\ line\\ 317,\\ in\\ get_requires_for_build_wheel\\\n\\ \\ \\ \\ return\\ self\\._get_build_requires\\(config_settings,\\ requirements=\\[\\]\\)\\\n\\.\\.\\.\\\nModuleNotFoundError:\\ No\\ module\\ named\\ 'setuptools'",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "Build isolation is enabled but setuptools is not installed in the isolated build environment, often due to a broken pip or missing build backend.",
  "root_cause_type": "generic",
  "root_cause_zh": "启用了构建隔离，但隔离的构建环境中未安装 setuptools，通常由于 pip 损坏或缺少构建后端。",
  "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": "Build isolation uses a separate environment; installing globally does not help.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "May still fail if setuptools is not installed in the main environment.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Install setuptools and wheel in the main env, then use `--no-build-isolation`: `pip install setuptools wheel && pip install --no-build-isolation foo`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.75,
      "how": "Upgrade pip to latest: `python -m pip install --upgrade 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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}