Given the name of a Python (2.X) package that can be installed with pip and virtualenv, is there any way to find out a list of all the possible versions of it that pip could install? Right now it's trial and error.
I'm trying to install a version for a third party library, but the newest version is too new, there were backwards incompatible changes made. So I'd like to somehow have a list of all the versions that pip knows about, so that I can test them.
You could the yolk3k package instead of yolk. yolk3k is a fork from the original yolk and it supports both python2 and 3.
https://github.com/myint/yolk
you can grep the result of your
pip list
Alternative solution is to use the Warehouse APIs:
https://warehouse.readthedocs.io/api-reference/json/#release
For instance for Flask:
will print:
You don't need a third party package to get this information. pypi provides simple JSON feeds for all packages under
Here's some Python code using only the standard library which gets all versions.
That code prints (as of Feb 23rd, 2015):
You can use this short Python3 snippet to grab the list of available versions for a package from PyPI. Unlike some other Python solutions posted here, this doesn't break on loose versions like
django
's1.10rc1
oruwsgi
's2.0.13.1
:For pip >= 9.0 use
– all the available versions will be printed without actually downloading or installing any additional packages.
For pip < 9.0 use
where
blork
can be any string that is not likely to be an install candidate.