python install_error ai_generated true

WARNING: The candidate selected for download or install is a yanked version: 'mypkg' candidate (version 2.0.0 at https://.../mypkg-2.0.0-py3-none-any.whl (from https://pypi.org/simple/mypkg/)) Reason for being yanked: <none given>

ID: python/pip-yanked-version-selected

Also available as: JSON · Markdown · 中文
80%Fix Rate
85%Confidence
0Evidence
2025-01-14First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.x active — — —

Root Cause

A pinned version in requirements.txt was yanked on PyPI, but pip still resolves it because the pin explicitly requests that exact version.

generic

中文

requirements.txt 中固定的版本已在 PyPI 上被撤回,但由于固定版本明确请求该确切版本,pip 仍然解析到它。

Workarounds

  1. 98% success
    Edit requirements.txt to mypkg==2.0.1 (or >=2.0.1,<3) and re-run pip install -r requirements.txt.
  2. 90% success
    Run pip-audit or pip index versions mypkg to list available versions and identify yanked ones.

Dead Ends

Common approaches that don't work:

  1. 90% fail

    Cache is not the reason the yanked version was selected.

  2. 88% fail

    Still resolves to the same yanked version.

  3. 80% fail

    Older pip silently installs yanked versions, hiding the problem.