esc esc - 5 months ago 39
Linux Question

How does pip decide which many linux wheel to use?

Binary many-linux wheels are now supported:

https://github.com/pypa/manylinux

Specifically I would like to install the many linux wheel for scipy on Travis, using the trusty beta operating system. The wheels are listed here:

https://pypi.python.org/pypi/scipy/0.17.1

I get:

Collecting scipy
Downloading scipy-0.17.1.tar.gz (12.4MB)
100% |████████████████████████████████| 12.4MB 100kB/s


Instead of:

Collecting scipy
Downloading scipy-0.17.1-cp27-cp27mu-manylinux1_x86_64.whl (39.5MB)
100% |████████████████████████████████| 39.5MB 37kB/s


So, in order to fix this, I would like to know, how pip determines which wheel to download and install. And yes, I did update pip to version 8.1.2 which supports binary many linux wheels.

Specifically, I am not interested in alternative solutions, just answer the question, if you can.

Answer

You need pip 8.1 or later and a linux distribution that is based on glibc (and not musl libc as alpine linux for instance).

EDIT: the function pip.pep425tags.get_supported() should return the list of supported platform tags.

Also may I kindly suggest you to use python 3.5 instead of 2.7 ;)

Comments