{
  "id": "python/error-could-not-build-wheels-for-package",
  "signature": "ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects",
  "signature_zh": "错误：无法为 cryptography 构建 wheel，而它是安装基于 pyproject.toml 的项目所必需的",
  "regex": "ERROR:\\ Could\\ not\\ build\\ wheels\\ for\\ cryptography,\\ which\\ is\\ required\\ to\\ install\\ pyproject\\.toml\\-based\\ projects",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "A dependency must be compiled from source because no matching wheel exists for the current platform/Python ABI. This happens when the interpreter is newer than the package's wheel matrix, or on musl/Alpine where manylinux wheels are incompatible.",
  "root_cause_type": "generic",
  "root_cause_zh": "由于当前平台/Python ABI 没有匹配的 wheel，某个依赖必须从源码编译。当解释器比包的 wheel 矩阵更新，或在 musl/Alpine 上 manylinux wheel 不兼容时会发生。",
  "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"
    },
    {
      "version": "3.13",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Upgrading tools does not produce a wheel for an unsupported ABI; build still fails.",
      "fail_rate": 0.55,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Cache is not the issue; the wheel simply does not exist for this platform.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Force reinstall re-triggers the same source build path.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.8,
      "how": "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\nsudo apt-get install build-essential libssl-dev libffi-dev python3-dev\npip install cryptography",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "FROM python:3.11-slim\nRUN pip install cryptography",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.7,
      "how": "pip install 'cryptography<42'",
      "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-09",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}