{
  "id": "python/pip-could-not-build-wheels-required-to-install-pyproject",
  "signature": "ERROR: Could not build wheels for <package>, which is required to install pyproject.toml-based projects",
  "signature_zh": "错误：无法为 <package> 构建 wheel，这是安装基于 pyproject.toml 的项目所必需的",
  "regex": "ERROR:\\ Could\\ not\\ build\\ wheels\\ for\\ <package>,\\ which\\ is\\ required\\ to\\ install\\ pyproject\\.toml\\-based\\ projects",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The package uses PEP 517 and pip must build a wheel, but the wheel build fails — typically due to missing C toolchain, missing headers (e.g., libssl-dev), or a compiler error in the C extension.",
  "root_cause_type": "generic",
  "root_cause_zh": "包使用 PEP 517，pip 必须构建 wheel，但 wheel 构建失败——通常由于缺少 C 工具链、缺少头文件（如 libssl-dev），或 C 扩展中的编译器错误。",
  "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": "Cache is not the issue; the compile step fails every time.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Pre-releases rarely ship wheels for every platform; the compile still fails.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.8,
      "how": "# Debian/Ubuntu\nsudo apt-get install -y build-essential python3-dev libssl-dev libffi-dev\n# macOS\nbrew install openssl@3\npip install <package>",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.75,
      "how": "pip install --only-binary=:all: <package>\n# fallback: download from https://pypi.org/project/<package>/#files",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-17",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}