python install_error ai_generated true

SetuptoolsDeprecationWarning:setup.py install 已弃用。请使用 build、pip 和其他基于标准的工具。

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

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

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

版本兼容性

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

根因分析

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

English

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

解决方案

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

无效尝试

常见但无效的做法:

  1. 60% 失败

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

  2. 70% 失败

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