我知道VTK现在可用作PyPI中的轮子(https://pypi.python.org/pypi/vtk/8.1.0),但我无法安装它。有办法解决这个问题吗?
当我尝试这是我得到的:
$ pip install vtk
Collecting vtk
Could not find a version that satisfies the requirement vtk (from versions: )
No matching distribution found for vtk
我已经尝试过指向滚轮的网址,但问题仍然存在。
$ 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
答案 0 :(得分:0)
所以问题与轮文件的文件'manylinux1'这一事实有关。
首先,找出pip
检查的平台。您可以使用pip
中的便捷功能(在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'交换:
$ 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
那应该解决它!