pip "No matching distribution" for a Yanked or Removed Version
Your exact pin used to install and now fails. The version still appears in the index but its files were yanked or removed, or the only file for your Python tag is gone - so pip filters to nothing.
What this error means
A pinned == requirement that installed cleanly last week now fails with "No matching distribution found". Loosening the pin installs a neighbouring version, which confirms the specific release - not your config - is the problem.
ERROR: Could not find a version that satisfies the requirement
some-lib==1.4.2 (from versions: 1.4.0, 1.4.1, 1.4.3)
ERROR: No matching distribution found for some-lib==1.4.2Common causes
The exact version was yanked
A maintainer yanked a release (PEP 592) for a regression or security issue. pip ignores yanked files unless that exact version is the only thing that satisfies the requirement - and even then warns.
The files for your Python tag were removed
The version still exists but its wheel for your interpreter tag (e.g. cp312) was deleted, leaving only sdists or other-tag wheels that do not match.
How to fix it
Move to an available neighbouring version
The "from versions:" list shows what is still installable. Pin to the nearest one and verify the changelog for the gap.
# 1.4.2 is gone; 1.4.3 is the next safe release
some-lib==1.4.3Pin from a lockfile so artifacts are stable
A committed lockfile that records hashes (or an internal mirror that retains yanked files) protects you from upstream deletions.
pip install pip-tools
pip-compile --generate-hashes requirements.inHow to prevent it
- Avoid pinning to a release on its day of publication; let it settle.
- Use a pull-through mirror that retains files even after upstream yanks.
- Read the "from versions:" list before re-pinning.