无法在x86_64上从PyPI安装VTK [英] Failure installing VTK from PyPI on x86_64
问题描述
我知道VTK现在可以在PyPI中作为转轮使用( https://pypi.python.org/pypi/vtk/8.1.0 ),但我无法安装.有办法解决吗?
I know that VTK is now available as a wheel in PyPI (https://pypi.python.org/pypi/vtk/8.1.0) but I am not able to install it. Is there a way around this?
当我尝试时,这就是我得到的:
When I try this is what I get:
$ pip install vtk
Collecting vtk
Could not find a version that satisfies the requirement vtk (from versions: )
No matching distribution found for vtk
我尝试指向方向盘的URL,但仍然是同样的问题.
I have tried pointing to the wheel's URL but still the same problem.
$ pip install https://pypi.python.org/packages/13/7f/735fbc0dd78c91ad3693cfdfe5c91603899fc8e24909f935d46d2fde6559/vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=49c8d620b2affe2dc2284048659115e5
vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl is not a supported wheel on this platform.
这是我的平台信息:
$ uname -a
Linux [hostname-withheld] 3.10.0-514.16.1.el7.x86_64 #1 SMP Fri Mar 10 13:12:32 EST 2017 x86_64 x86_64 x86_64 GNU/Linux
推荐答案
因此,问题在于转轮文件的文本为'manylinux1'.
So the problem has to do with the fact that the wheel files have the text 'manylinux1'.
首先,找出pip
检查哪些平台.您可以使用pip
中的便捷功能(在
First, find out which platforms pip
checks for. You can do this using a handy feature in pip
(found on https://github.com/tensorflow/tensorflow/issues/9722):
$ python -c 'from pip import pep425tags; print pep425tags.supported_tags'
[('cp27', 'cp27mu', 'linux_x86_64'), ('cp27', 'none', 'linux_x86_64'), ('py2', 'none', 'linux_x86_64'), ('cp27', 'none', 'any'), ('cp2', 'none', 'any'), ('cp26', 'none', 'any'), ('cp25', 'none', 'any'), ('cp24', 'none', 'any'), ('cp23', 'none', 'any'), ('cp22', 'none', 'any'), ('cp21', 'none', 'any'), ('cp20', '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')]
第一个结果表明,我们应该将'manylinux1'换成'linux':
The first result shows that we should swap the 'manylinux1' with simply 'linux':
$ wget https://pypi.python.org/packages/13/7f/735fbc0dd78c91ad3693cfdfe5c91603899fc8e24909f935d46d2fde6559/vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=49c8d620b2affe2dc2284048659115e5
--2018-03-01 14:29:06-- https://pypi.python.org/packages/13/7f/735fbc0dd78c91ad3693cfdfe5c91603899fc8e24909f935d46d2fde6559/vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl
Resolving pypi.python.org (pypi.python.org)... 151.101.16.223, 2a04:4e42:4::223
Connecting to pypi.python.org (pypi.python.org)|151.101.16.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 48860459 (47M) [binary/octet-stream]
Saving to: ‘vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl’
100%[====================================================================================================================================================================================================================>] 48,860,459 90.5MB/s in 0.5s
2018-03-01 14:29:07 (90.5 MB/s) - ‘vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl’ saved [48860459/48860459]
使用符号链接重命名:
$ ln -s vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl vtk-8.1.0-cp27-cp27mu-linux_x86_64.whl
现在安装:
$ pip install vtk-8.1.0-cp27-cp27mu-linux_x86_64.whl
那应该解决它!
这篇关于无法在x86_64上从PyPI安装VTK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!