问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/51880687/installing-vtk-with-pip