从vtk.org下载最新的VTK版本(7.0.0)的tar.gz文件后,我创建了一个构建文件夹,运行了ccmake,并将标志设置为Python3.5,将PYTHON_WRAPPING标志设置为on,然后运行make命令,接着是make install命令。
>>> import vtk
我遇到了以下错误:
In [1]: import vtk
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/vtk/vtkCommonCore.py in <module>()
4 # use relative import for installed modules
----> 5 from .vtkCommonCorePython import *
6 except ImportError:
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/vtk/vtkCommonCorePython.so, 2): Library not loaded: libvtkCommonCorePython35D-7.0.1.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/vtk/vtkCommonCorePython.so
Reason: image not found
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-1-b7e11aadda62> in <module>()
----> 1 import vtk
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/vtk/__init__.py in <module>()
39
40 # --------------------------------------
---> 41 from .vtkCommonCore import *
42 from .vtkCommonMath import *
43 from .vtkCommonMisc import *
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/vtk/vtkCommonCore.py in <module>()
7 # during build and testing, the modules will be elsewhere,
8 # e.g. in lib directory or Release/Debug config directories
----> 9 from vtkCommonCorePython import *
ImportError: No module named 'vtkCommonCorePython'
任何想法为什么会发生这种情况?