python install_error ai_generated true

RuntimeError: Setuptools 版本 58.0.0 太旧,无法使用 pyproject.toml 构建系统。最低要求是 60.0.0。

RuntimeError: Setuptools version 58.0.0 is too old to use the pyproject.toml build system. Minimum required is 60.0.0.

ID: python/setuptools-version-mismatch

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

版本兼容性

版本状态引入弃用备注
3.8 active — — —
3.9 active — — —
3.10 active — — —
3.11 active — — —
3.12 active — — —

根因分析

安装的 setuptools 版本不支持 pyproject.toml 中定义的构建系统。

English

The installed setuptools version does not support the build system defined in pyproject.toml.

generic

解决方案

  1. 95% 成功率 Upgrade setuptools to a compatible version
    pip install --upgrade setuptools>=60.0.0
  2. 90% 成功率 Use a virtual environment with a newer Python version
    python3.11 -m venv venv && source venv/bin/activate && pip install setuptools

无效尝试

常见但无效的做法:

  1. Downgrading pip 90% 失败

    The issue is with setuptools, not pip; downgrading pip does not help.

  2. Removing pyproject.toml 70% 失败

    setuptools may fall back to setup.py, but modern packages rely on pyproject.toml.