python install_error ai_generated true

警告:为下载或安装选择的候选版本是被撤回的版本:'foo' 候选(版本 1.2.3)。撤回原因:构建损坏。

WARNING: The candidate selected for download or install is a yanked version: 'foo' candidate (version 1.2.3 at https://.../foo-1.2.3-py3-none-any.whl) Reason for being yanked: broken build

ID: python/pip-yanked-version-installed

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

版本兼容性

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

根因分析

维护者在 PyPI 上撤回了某个发布;如果它是唯一满足约束的版本,pip 仍会安装,但会发出警告。

English

The maintainer yanked a release on PyPI; pip still installs it if it is the only version satisfying constraints, but warns loudly.

generic

解决方案

  1. 90% 成功率
    Pin to a non-yanked version:
      pip install 'foo==1.2.2'
    Or allow any non-yanked:
      pip install 'foo!=1.2.3'
  2. 90% 成功率
    Check available versions:
      pip index versions foo
    Then choose the latest non-yanked release.

无效尝试

常见但无效的做法:

  1. 60% 失败

    Upgrade only moves to a newer version if one is available; if the yanked release is the only match, the warning persists.

  2. 95% 失败

    That flag controls script location warnings, not yanked-version warnings.