Python and pip, list all versions of a package that's available? Python and pip, list all versions of a package that's available? python python

Python and pip, list all versions of a package that's available?


For pip >= 21.2 use:

pip index versions pylibmc

Note that this command is experimental, and might change in the future!

For pip >= 21.1 use:

pip install pylibmc==

For pip >= 20.3 use:

pip install --use-deprecated=legacy-resolver pylibmc==

For pip >= 9.0 use:

$ pip install pylibmc==Collecting pylibmc==  Could not find a version that satisfies the requirement pylibmc== (from   versions: 0.2, 0.3, 0.4, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5, 0.6.1, 0.6,   0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7, 0.8.1, 0.8.2, 0.8, 0.9.1, 0.9.2, 0.9,   1.0-alpha, 1.0-beta, 1.0, 1.1.1, 1.1, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.3.0)No matching distribution found for pylibmc==

The available versions will be printed without actually downloading or installing any packages.

For pip < 9.0 use:

pip install pylibmc==blork

where blork can be any string that is not a valid version number.


(update: As of March 2020, many people have reported that yolk, installed via pip install yolk3k, only returns latest version. Chris's answer seems to have the most upvotes and worked for me)

The script at pastebin does work. However it's not very convenient if you're working with multiple environments/hosts because you will have to copy/create it every time.

A better all-around solution would be to use yolk3k, which is available to install with pip. E.g. to see what versions of Django are available:

$ pip install yolk3k$ yolk -V djangoDjango 1.3Django 1.2.5Django 1.2.4Django 1.2.3Django 1.2.2Django 1.2.1Django 1.2Django 1.1.4Django 1.1.3Django 1.1.2Django 1.0.4

yolk3k is a fork of the original yolk which ceased development in 2012. Though yolk is no longer maintained (as indicated in comments below), yolk3k appears to be and supports Python 3.

Note: I am not involved in the development of yolk3k. If something doesn't seem to work as it should, leaving a comment here should not make much difference. Use the yolk3k issue tracker instead and consider submitting a fix, if possible.


You don't need a third party package to get this information. pypi provides simple JSON feeds for all packages under

https://pypi.org/pypi/{PKG_NAME}/json

Here's some Python code using only the standard library which gets all versions.

import jsonimport urllib2from distutils.version import StrictVersiondef versions(package_name):    url = "https://pypi.org/pypi/%s/json" % (package_name,)    data = json.load(urllib2.urlopen(urllib2.Request(url)))    versions = data["releases"].keys()    versions.sort(key=StrictVersion)    return versionsprint "\n".join(versions("scikit-image"))

That code prints (as of Feb 23rd, 2015):

0.7.20.8.00.8.10.8.20.9.00.9.10.9.20.9.30.10.00.10.1


matomo