How does pip choose how many linux wheels to use?

Binary disks with several lines are now supported:

https://github.com/pypa/manylinux

In particular, I would like to install many linux wheels for scipy on Travis, using a reliable beta version of the 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:

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

So, to fix this, I would like to know how pip determines which wheel to download and install. And yes, I upgraded pip to version 8.1.2, which supports the binary disks of many Linux.

In particular, I'm not interested in alternative solutions, just answer the question if you can.

+7
source share
3 answers

You need pip 8.1 or later and a linib distribution based on glibc (and not musl libc like alpine linux for example).

EDIT: the pip._internal.pep425tags.get_supported() function should return a list of supported platform tags in order. Pip prefers wheel tags that appear earlier in this list, rather than tags that appear later

I can also suggest you use python 3.5 instead of 2.7;)

+8
source

So the correct answer is that pip has a list of supported tags and will try to match them. pip.pep425tags.get_supported() display tags for your platform and will also use this list to match manylinux binary wheels.

+1
source

For pip 10 you need to do:

 from pprint import pprint import pip._internal pprint(pip._internal.pep425tags.get_supported()) 
+1
source

All Articles