I’m trying to install pytorch (http://pytorch.org/) on Linux, and according to my machine configuration, the command I should run is:
pip install https://s3.amazonaws.com/pytorch/whl/torch-0.1.6.post17-cp27-cp27mu-linux_x86_64.whl
On one machine (Linux distribution Slackware 14.1) the installation fails with error: torch-0.1.6.post17-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.
, while on another one (Ubuntu 15.10) it succeeds. From what I understood, the problem seems to be the cp27mu
in the wheel name.
Using the command import pip; print(pip.pep425tags.get_supported())
from the Python shell, I get this from the Slackware machine:
[('cp27', 'cp27m', 'manylinux1_x86_64'), ('cp27', 'cp27m', 'linux_x86_64'), ('cp27', 'none', 'manylinux1_x86_64'), ('cp27', 'none', 'linux_x86_64'), ('py2', 'none', 'manylinux1_x86_64'), ('py2', 'none', 'linux_x86_64'), ('cp27', 'none', 'any'), ('cp2', 'none', 'any'), ('py27', 'none', 'any'), ('py2', 'none', 'any'), ('py26', 'none', 'any'), ('py25', 'none', 'any'), ('py24', 'none', 'any'), ('py23', 'none', 'any'), ('py22', 'none', 'any'), ('py21', 'none', 'any'), ('py20', 'none', 'any')]
and this from the Ubuntu machine:
[('cp27', 'cp27mu', 'manylinux1_x86_64'), ('cp27', 'cp27mu', 'linux_x86_64'), ('cp27', 'none', 'manylinux1_x86_64'), ('cp27', 'none', 'linux_x86_64'), ('py2', 'none', 'manylinux1_x86_64'), ('py2', 'none', 'linux_x86_64'), ('cp27', 'none', 'any'), ('cp2', 'none', 'any'), ('py27', 'none', 'any'), ('py2', 'none', 'any'), ('py26', 'none', 'any'), ('py25', 'none', 'any'), ('py24', 'none', 'any'), ('py23', 'none', 'any'), ('py22', 'none', 'any'), ('py21', 'none', 'any'), ('py20', 'none', 'any')]
From https://www.python.org/dev/peps/pep-0513/, it seems to me that supporting cp27m
or cp27mu
depends on an option passed at compile time, --enable-unicode
.
Now, maybe at this point I shouldn’t even be asking the question, but just to be sure, does this mean that I have to compile Python with the --enable-unicode=ucs4
on the Slackware machine in order to install that wheel?
Advertisement
Answer
This is exactly that. Recompile python under slack with –enable-unicode=ucs4 and you can then install the whl.