当我尝试导入vtk时,它不起作用。 我试过this method(使用cmake构建vtk并更新环境变量 - 除了" Post安装任务"),但我仍然有:
$python
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named vtk
我之前尝试过
sudo brew install python-vtk
但它返回:
Error: No available formula with the name "python-vtk"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
如何在Mac计算机上的Python代码中导入vtk而没有问题?