python install_error ai_generated true

错误:Cython.Distutils.build_ext不可用

error: Cython.Distutils.build_ext is not available

ID: python/setuptools-cython-not-found

其他格式: JSON · Markdown 中文 · English
80%修复率
87%置信度
0证据数
2024-10-01首次发现

版本兼容性

版本状态引入弃用备注
3.10 active

根因分析

包使用Cython构建C扩展,但构建环境中未安装Cython。

English

The package uses Cython to build C extensions, but Cython is not installed in the build environment.

generic

解决方案

  1. 90% 成功率
    In pyproject.toml: [build-system] requires = ["setuptools", "Cython"]
  2. 85% 成功率
    pip install Cython && pip install --no-build-isolation package
  3. 80% 成功率
    pip install --only-binary :all: package

无效尝试

常见但无效的做法:

  1. 60% 失败

    May not be in the isolated build environment.

  2. 90% 失败

    Still requires Cython.

  3. 70% 失败

    May break the build.