pip package_error ai_generated true

WARNING: The candidate selected for download or install is a yanked version: '<package>==X.Y.Z' (reason: 'critical bug')

ID: pip/yanked-version

Also available as: JSON · Markdown
90%Fix Rate
92%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
24 active

Root Cause

Pip selected a yanked version of a package. Yanked releases are marked by maintainers as broken or dangerous but not deleted. Pip will still install them if explicitly pinned but warns about it.

generic

Workarounds

  1. 92% success Update to the next non-yanked version: pip install '<package>>=X.Y.Z+1'
    Check available versions with pip index versions <package>, pick the nearest non-yanked version
  2. 88% success Remove the explicit version pin to let pip select the latest non-yanked version
    Change package==X.Y.Z to package>=X.Y in requirements.txt and re-resolve

Dead Ends

Common approaches that don't work:

  1. Ignore the warning and keep using the yanked version 70% fail

    Yanked versions typically have critical bugs, security vulnerabilities, or data corruption issues

  2. Try to find the yanked version on a mirror that doesn't respect yank status 80% fail

    The package is yanked for a reason; installing it from a mirror just bypasses the safety warning

Error Chain

Leads to:
Preceded by:
Frequently confused with: