Search code examples
pythonpippypi

pip: yanked release is somehow accessible as default


When I try to install a python package from pypi, somehow the yanked version is installed by default.

According to the history of the terminado package: https://pypi.org/project/terminado/#history version 0.13.0 is yanked, but when running the following

h-ishida@0bbb747d2765:~$ pip install terminado==foo ERROR: Could not find a version that satisfies the requirement terminado==foo (from versions: 0.1, 0.2, 0.3, 0.3.1, 0.3.2, 0.3.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.8.1, 0.8.2, 0.8.3, 0.13.0) ERROR: No matching distribution found for terminado==foo

the top listed version is 0.13.0, which is yanked, and when try to install it without any version specification, 0.13.0 is installed.

Note that pip version is 9.0.1 for python2. The problem is that 0.13.0 is not compatible with python2 any longer, and thus the error occurred in installation.

What the cause of this bug? Is this pip or pypi's bug? or Did I made something wrong?


Solution

  • It's entirely possible you're using a buggy (three-year-old!five-year-old) version of Pip that doesn't know about yanked versions or can't figure out which versions of packages support Python 2 and Python 3, but also Python 2 has been end-of-life and out of support for 3 years, so you shouldn't be using it in the first place.

    It looks like terminado==0.8.3 is the last version supporting Python 2 (based on the existence of a py2.py3 wheel), so just explicitly install it if you really need to.