python install_error ai_generated partial

DEPRECATION:旧式 setup.py install 已弃用。pip 24.1 将强制此行为变更。可能的替代方案是升级到更新版本的 <pkg>,或联系作者建议其发布 PEP 517 构建后端。

DEPRECATION: Legacy setup.py install is deprecated. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of <pkg> or contact the author to suggest that they release a PEP 517 build backend.

ID: python/pip-egg-info-deprecated-setup-py

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

版本兼容性

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

根因分析

该包仅提供旧式 `setup.py` 而缺少 `pyproject.toml`,因此 pip 必须调用 `setup.py install` 而非 PEP 517 后端。

English

The package ships only a legacy `setup.py` without `pyproject.toml`, so pip must invoke `setup.py install` instead of a PEP 517 backend.

generic

解决方案

  1. 85% 成功率
    Pin a version that has migrated to pyproject.toml, or vendor the source and add a minimal pyproject.toml with `[build-system] requires=['setuptools>=61'] build-backend='setuptools.build_meta'`.
  2. 70% 成功率
    Silence locally with `PYTHONWARNINGS=ignore::DeprecationWarning` for CI noise only (does NOT fix the underlying issue).

无效尝试

常见但无效的做法:

  1. 85% 失败

    The deprecation is about the missing PEP 517 metadata, not build isolation.

  2. 60% 失败

    If the upstream project has not yet migrated, the newest release still triggers the same deprecation.