0
我想用python包裝生成VTK庫。我想開發一個python程序,以VTK格式後處理一些CFD結果。編譯vtk與python包裝
我正在編譯本地文件夾中的源代碼。編譯我收到以下錯誤信息時,首先:
不幸的是我現在面臨幾個問題
CMake Error at Common/Core/cmake_install.cmake:47 (file):
file INSTALL cannot find
"/home/riccardo/Software/VTK/build/lib/libvtkCommonCore-8.0.so.1".
我嘗試禁用共享庫的選擇,因爲這裏VTK install error cannot find libvtkCommonCore-6.3.so.1 在cmake的配置建議
cmake ..\
-DCMAKE_INSTALL_PREFIX=/home/riccardo/Software/VTK/build \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DVTK_USE_SYSTEM_ZLIB:BOOL=ON
在這種情況下,彙編了罰款,但是當我試圖在python導入VTK我得到這個錯誤:
from .vtkCommonCore import *
42 from .vtkCommonMath import *
43 from .vtkCommonMisc import *
~/Software/VTK/build/Wrapping/Python/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'
我真的不知道如何解決它。 任何幫助將不只是歡迎。
非常感謝提前!
我忘了;操作系統是Ubuntu 16.04,安裝後我已經更新了我的PYTHONPATH,即LD_LIBRARY_PATH export PYTHONPATH = $ PYTHONPATH:$ HOME/Software/VTK/build/Wrapping/Python /:$ HOME/Software/VTK/build/bin 012-export LD_LIBRARY_PATH = $ HOME/Software/VTK/build/bin:/ usr/local/lib /:$ LD_LIBRARY_PATH – rickyrubini
[ImportError:No module named vtkCommonPython](https://stackoverflow.com/questions/13495285/importerror-no -module-named-vtkcommonpython) –
是的,我檢查了這個問題,我設法使它與python2.7,但不是與python3.5 – rickyrubini