python install_error ai_generated true

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

Also available as: JSON · Markdown · 中文
80%Fix Rate
85%Confidence
0Evidence
2024-06-05First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.8 active
3.9 active
3.10 active
3.11 active
3.12 active

Root Cause

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

generic

中文

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

Workarounds

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

Dead Ends

Common approaches that don't work:

  1. Downgrading pip 90% fail

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

  2. Removing pyproject.toml 70% fail

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