{
  "id": "python/pip-build-isolation-no-module-named-setuptools",
  "signature": "ModuleNotFoundError: No module named 'setuptools'\n  [end of output]\n  note: This error originates from a subprocess, and is likely not a problem with pip.",
  "signature_zh": "模块未找到错误：没有名为 'setuptools' 的模块\n  [输出结束]\n  注意：此错误源自子进程，可能不是 pip 的问题。",
  "regex": "ModuleNotFoundError:\\ No\\ module\\ named\\ 'setuptools'\\\n\\ \\ \\[end\\ of\\ output\\]\\\n\\ \\ note:\\ This\\ error\\ originates\\ from\\ a\\ subprocess,\\ and\\ is\\ likely\\ not\\ a\\ problem\\ with\\ pip\\.",
  "domain": "python",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "With build isolation, pip creates a temp env and installs build deps from pyproject.toml. If [build-system] is missing or requires only 'wheel', setuptools isn't present and the build fails.",
  "root_cause_type": "generic",
  "root_cause_zh": "在构建隔离下，pip 创建临时环境并从 pyproject.toml 安装构建依赖。如果缺少 [build-system]，或只声明 'wheel'，则没有 setuptools，构建失败。",
  "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": "Build isolation ignores the outer env.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Doesn't populate the isolated build env.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Removes PEP 518 config; pip falls back to legacy but may still fail.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.92,
      "how": "# pyproject.toml\n[build-system]\nrequires = [\"setuptools>=64\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "pip install --upgrade setuptools wheel\npip install . --no-build-isolation",
      "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.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-07",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}