Python轮:不支持cp27mu

时间:2017-01-20 15:22:08

标签: python linux unicode pytorch

我试图在Linux上安装pytorch(http://pytorch.org/),根据我的机器配置,我应该运行的命令是:

pip install https://s3.amazonaws.com/pytorch/whl/torch-0.1.6.post17-cp27-cp27mu-linux_x86_64.whl

在一台计算机上(Linux发行版Slackware 14.1),安装失败,错误:torch-0.1.6.post17-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.,而另一台(Ubuntu 15.10)则成功。根据我的理解,问题似乎是轮名中的cp27mu

使用Python shell中的import pip; print(pip.pep425tags.get_supported())命令,我从Slackware机器上得到了这个:

[('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')]

这来自Ubuntu机器:

[('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')]

https://www.python.org/dev/peps/pep-0513/开始,在我看来,支持cp27mcp27mu取决于在编译时传递的选项--enable-unicode

现在,也许在这一点上我甚至不应该问这个问题,但是为了确定,这是否意味着我必须在Slackware机器上使用--enable-unicode=ucs4编译Python以便安装那个轮子?

1 个答案:

答案 0 :(得分:6)

就是这样。 使用--enable-unicode = ucs4在松弛下重新编译python然后你可以安装whl。

相关问题