问题描述
我正在运行 Fedora 17 (x64) 机器,我尝试通过
I'm running a Fedora 17 (x64) machine, and I tried installing Mayavi for python via
yum install mayavi
效果很好,除了每次我编写代码时调用 mayavi 模块(如 mlab):
which worked fine, except every time I write a code where I call a mayavi module (like mlab) :
from enthought.mayavi import mlab
它大喊错误
********************************************************************************
WARNING: Imported VTK version (5.8) does not match the one used
to build the TVTK classes (5.6). This may cause problems.
Please rebuild TVTK.
********************************************************************************
我用谷歌搜索过,但我不知道如何重建 TVTK 以匹配 VTK 的版本.我怀疑这会导致异常行为,但我不能确定.你如何重建 TVTK?
I've googled, but I don't know how to rebuild TVTK to match with the version of VTK. I suspect this is causing abnormal behaviour, but I can't be sure. How do you rebuild TVTK?
推荐答案
看起来像可视化工具包 (http://www.vtk.org/) 比用于构建打包在 mayavi 中的类的文件要新.您需要重建/安装可视化工具包 5.6 (http://vtk.org/VTK/resources/software.html) 或者您是否尝试过 Mayavi2(http://docs.enthought.com/mayavi/mayavi/installation.html) - 这可能是最新的,可视化工具包目前是 5.10 版.
Looks like the visualization toolkit (http://www.vtk.org/) on your machine is newer than the one used to build the classes that are packaged in mayavi. You'd need to rebuild/install visualization toolkit 5.6 (http://vtk.org/VTK/resources/software.html) or have you tried Mayavi2 (http://docs.enthought.com/mayavi/mayavi/installation.html) - that is probably more up to date, visualization toolkit is currently version 5.10.
这篇关于Mayavi (Python) 中的 TVTK 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!