python install_error ai_generated true

SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.

ID: python/setuptools-deprecated-setup-py-test

Also available as: JSON · Markdown · 中文
80%Fix Rate
88%Confidence
0Evidence
2024-01-20First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.7-3.12 active

Root Cause

Running 'python setup.py install' directly, which setuptools has deprecated in favor of PEP 517 build backends and pip.

generic

中文

直接运行 'python setup.py install',setuptools 已弃用该命令,转而推荐 PEP 517 构建后端和 pip。

Workarounds

  1. 95% success
    pip install .  # or pip install -e . for editable installs
  2. 92% success
    python -m build && pip install dist/*.whl

Dead Ends

Common approaches that don't work:

  1. 95% fail

    Flag only silences script location warnings, not the deprecation warning.

  2. 70% fail

    Downgrading setuptools breaks many modern packages that require recent setuptools features.