python install_error ai_generated true

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

ID: python/setuptools-setup-py-deprecated

Also available as: JSON · Markdown · 中文
80%Fix Rate
89%Confidence
0Evidence
2024-03-30First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.x active

Root Cause

Running python setup.py install directly is deprecated in favor of PEP 517 build frontends like pip and build.

generic

中文

直接运行 python setup.py install 已弃用,推荐使用 PEP 517 构建前端如 pip 和 build。

Workarounds

  1. 95% success
    pip install .  # builds and installs using PEP 517
  2. 92% success
    pip install build; python -m build

Dead Ends

Common approaches that don't work:

  1. 70% fail

    Hides the deprecation but does not fix the underlying issue; future removal will break the workflow.

  2. 60% fail

    Avoids the warning temporarily but locks you out of security fixes and new features.