{
  "id": "python/setuptools-cython-build-ext-failed",
  "signature": "error: command 'gcc' failed with exit status 1\n    building 'foo._speedups' extension",
  "signature_zh": "错误：命令 'gcc' 以退出状态 1 失败\n    正在构建 'foo._speedups' 扩展",
  "regex": "error:\\ command\\ 'gcc'\\ failed\\ with\\ exit\\ status\\ 1\\\n\\ \\ \\ \\ building\\ 'foo\\._speedups'\\ extension",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "A package with C extensions (Cython) is being built from sdist but the compiler toolchain or Python development headers are missing/incompatible, so gcc fails during the extension build.",
  "root_cause_type": "generic",
  "root_cause_zh": "一个带 C 扩展（Cython）的包正从 sdist 构建，但编译器工具链或 Python 开发头文件缺失/不兼容，导致 gcc 在扩展构建期间失败。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Disabling isolation doesn't install gcc or python-dev headers; the compiler is still absent.",
      "fail_rate": 0.65,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Build tooling versions don't affect the missing system compiler/headers; compilation still fails.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Install a prebuilt wheel: pip install --only-binary=:all: foo  # avoids compilation entirely",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.82,
      "how": "Install the toolchain: sudo apt install build-essential python3-dev  # then pip install foo",
      "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.84,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-12-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}