用pip安装VTK [英] Installing VTK with pip

查看:435
本文介绍了用pip安装VTK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Arch Linux上使用的是Python 3.7. 我一直在尝试通过pip安装Mayavi,但是在安装vtk时它总是失败.因此,我发现,即使尝试通过pip >自行安装vtk 时, vtk确实没有安装.我收到此错误:

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

这对我来说似乎是一个非常愚蠢的错误,但是我真的不明白发生了什么.据我所知,VTK应该现在与Py3兼容. pipget-pip.py一起安装,并且其他所有功能始终正常运行.

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.

奇怪的是,pip2 install vtk mayavi起作用.

有什么想法吗?

PS .:我避免为工作相关的问题创建单独的环境.

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

编辑

我做了手动方法:

$ 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.

我不知道是什么原因.我试图遵循此答案,但我可以t使第一个pep命令起作用.

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.

推荐答案

找不到满足vtk要求的版本(来自版本:)

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

当前发布的文件中,Python 2.7没有二进制文件并且有源代码.您应该尝试使用其他版本的Python(2.7、3.4-3.6)或从源代码编译/安装 VTK a>.

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.

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

您正在尝试为Python 3.7安装Python 2.7二进制车轮.那是不可能的.

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

这篇关于用pip安装VTK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆