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
80%Fix Rate
85%Confidence
0Evidence
2025-01-14First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 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
-
98% success
Edit requirements.txt to mypkg==2.0.1 (or >=2.0.1,<3) and re-run pip install -r requirements.txt.
-
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:
-
90% fail
Cache is not the reason the yanked version was selected.
-
88% fail
Still resolves to the same yanked version.
-
80% fail
Older pip silently installs yanked versions, hiding the problem.