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

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

版本兼容性

版本状态引入弃用备注
3.x active

根因分析

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

English

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

generic

解决方案

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

无效尝试

常见但无效的做法:

  1. 70% 失败

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

  2. 60% 失败

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