{
  "id": "pip/egg-info-failure-requires-cython",
  "signature": "error: subprocess-exited-with-error: python setup.py egg_info did not run successfully. exit code: 1. Cython.Compiler.Errors.CompileError: /tmp/pip-install-xxx/package/src/foo.pyx:1:0: 'bar.pxd' not found",
  "signature_zh": "错误：子进程退出失败：python setup.py egg_info 未成功运行。退出码：1。Cython 编译器错误：/tmp/pip-install-xxx/package/src/foo.pyx:1:0：找不到 'bar.pxd'",
  "regex": "Cython\\.Compiler\\.Errors\\.CompileError:.*\\.pxd' not found",
  "domain": "pip",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "The package requires a Cython extension file (.pxd) that is missing from the source distribution, often because it is generated by a build script that was not run before packaging.",
  "root_cause_type": "generic",
  "root_cause_zh": "该软件包需要一个 Cython 扩展文件（.pxd），但该文件在源代码分发包中缺失，通常是因为生成该文件的构建脚本在打包前未运行。",
  "versions": [
    {
      "version": "pip 23.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "setuptools 68.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Cython 3.0.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Manually creating a dummy .pxd file with the same name in the package directory",
      "why_fails": "The .pxd file has specific type declarations and interfaces that must match the .pyx file; a dummy file will cause compilation errors or silent failures.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Running pip install --no-build-isolation to use system Cython",
      "why_fails": "The missing .pxd is not a Cython version issue; it's a missing source file that no Cython version can generate without the original build script.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Installing the package from a pre-built wheel instead of source",
      "why_fails": "If the package maintainer did not publish a wheel for the platform/Python version, this option is not available.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Install the package from its VCS repository (e.g., git) which includes the build script that generates the .pxd file: pip install git+https://github.com/user/package.git",
      "success_rate": 0.85,
      "how": "Install the package from its VCS repository (e.g., git) which includes the build script that generates the .pxd file: pip install git+https://github.com/user/package.git",
      "condition": "",
      "sources": []
    },
    {
      "action": "Patch the source distribution by downloading the .tar.gz, extracting it, running the build script (e.g., python setup.py build_ext --inplace) to generate the missing .pxd, then repackaging and installing with pip install ./package-version.tar.gz",
      "success_rate": 0.7,
      "how": "Patch the source distribution by downloading the .tar.gz, extracting it, running the build script (e.g., python setup.py build_ext --inplace) to generate the missing .pxd, then repackaging and installing with pip install ./package-version.tar.gz",
      "condition": "",
      "sources": []
    },
    {
      "action": "Contact the package maintainer to request a fixed source distribution or wheel that includes the missing .pxd file.",
      "success_rate": 0.3,
      "how": "Contact the package maintainer to request a fixed source distribution or wheel that includes the missing .pxd file.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "从版本控制系统（如 git）安装该软件包，其中包含生成 .pxd 文件的构建脚本：pip install git+https://github.com/user/package.git",
    "修补源代码分发包：下载 .tar.gz，解压，运行构建脚本（如 python setup.py build_ext --inplace）生成缺失的 .pxd，然后重新打包并用 pip install ./package-version.tar.gz 安装。",
    "联系软件包维护者，请求发布包含缺失 .pxd 文件的固定源代码分发包或 wheel。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pip.pypa.io/en/stable/topics/build-system/",
  "official_doc_section": null,
  "error_code": "ERROR",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.75,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}