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-install-deprecated

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

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.8 active — — —
3.9 active — — —
3.10 active — — —
3.11 active — — —
3.12 active — — —

Root Cause

setuptools deprecated the direct `setup.py install` command. It bypasses wheel building, produces non-reproducible installs, and will be removed. Triggered when scripts or Makefiles still call it directly.

generic

中文

setuptools 弃用了直接调用 `setup.py install` 命令。它绕过 wheel 构建,产生不可复现的安装,并将被移除。当脚本或 Makefile 仍直接调用它时会触发。

Workarounds

  1. 98% success
    pip install .
  2. 97% success
    python -m build && pip install dist/*.whl
  3. 95% success
    pip install -e .

Dead Ends

Common approaches that don't work:

  1. 60% fail

    Silences the warning but the command will be removed in a future setuptools release.

  2. 70% fail

    Pins to an ancient version, breaking compatibility with other tools.