简体   繁体   中英

Installing VTK with pip

I'm using Python 3.7 on Arch Linux. I've been trying to install Mayavi with pip but it always fails when installing vtk. So I found out that even when trying to install vtk by itself via pip (which should work) that vtk is really not installing. I get this error:

$ sudo pip3 install vtk
Collecting vtk
  Could not find a version that satisfies the requirement vtk (from versions: )
No matching distribution found for vtk

This seems like a very dumb error on my part, but I really can't understand what's going on. VTK should be compatible with Py3 now as far as I know. pip was installed with get-pip.py and everything else has always worked perfectly.

Curiously enough, pip2 install vtk mayavi works.

Any ideas?

PS.: I'm avoiding creating a separate environment for work-related issues.

EDIT

I did the manual approach:

$ wget https://pypi.python.org/packages/13/7f/735fbc0dd78c91ad3693cfdfe5c91603899fc8e24909f935d46d2fde6559/vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl
$ sudo pip3 install vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl
vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl is not a supported wheel on this platform.

Which I don't know what's causing. I've tried to follow this answer but I can't make the first pep command work.

Could not find a version that satisfies the requirement vtk (from versions: )

Among the currently released files there are no binaries for Python 2.7 and there is source code. Either you should try a different version of Python (2.7, 3.4-3.6) or compile/install VTK from sources .

vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl is not a supported wheel on this platform.

You're trying to install a Python 2.7 binary wheel for Python 3.7. That's impossible.

该轮子尚未在 pip 上发布,您可以直接从 vtk.org 下载并安装一个: https ://vtk.org/download/

你可以手动编译你想要的VTK版本包,放到dist-Packages目录下。我有一个具体的方法。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM