我已经按照这些说明安装了 vtk并在 CMakeCache.txt 中进行了设置
BUILD_SHARED_LIBS:BOOL=ON
PYTHON_EXECUTABLE:FILEPATH=/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
(在 ipython 下运行的实际 python)
VTK_WRAP_PYTHON:BOOL=ON
编译成功,但是当我转向 python 时,我得到:
Python 2.7.3 (default, Nov 28 2012, 13:43:07)
Type "copyright", "credits" or "license" for more information.
IPython 0.13.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import pkgutil
In [2]: package = pkgutil.get_loader("vtk")
In [3]: package.filename
Out[3]: '/usr/local/lib/python2.7/site-packages/VTK-5.10.1-py2.7.egg/vtk'
In [4]: import vtk
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap
有人知道吗?