{
  "id": "python/setuptools-command-not-found-error",
  "signature": "error: Setup script exited with error: command 'gcc' failed: No such file or directory",
  "signature_zh": "错误：安装脚本退出，错误：命令 'gcc' 失败：没有那个文件或目录",
  "regex": "error:\\ Setup\\ script\\ exited\\ with\\ error:\\ command\\ 'gcc'\\ failed:\\ No\\ such\\ file\\ or\\ directory",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "A Python package with C extensions requires a C compiler (like gcc) which is not installed on the system.",
  "root_cause_type": "generic",
  "root_cause_zh": "具有 C 扩展的 Python 包需要 C 编译器（如 gcc），但系统上未安装。",
  "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"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Installing gcc but not the required development headers (python3-dev)",
      "why_fails": "Without Python headers, gcc cannot find necessary include files like Python.h",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using `pip install --no-build-isolation` alone",
      "why_fails": "This flag only disables build isolation, but gcc is still needed for compilation.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Install C compiler and Python development headers",
      "success_rate": 0.9,
      "how": "On Ubuntu/Debian: `sudo apt-get install build-essential python3-dev`. On CentOS/RHEL: `sudo yum install gcc python3-devel`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a pre-built wheel if available",
      "success_rate": 0.75,
      "how": "`pip install --only-binary=:all: <package_name>` or find a wheel from PyPI or an alternative index.",
      "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-02-18",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}