vtk build succeeds but python says module doesn't exist? -
i'm building vtk on cent os. install python wrappers, , i've followed build directions so.
i've installed under prefix ~/local
. things appear have gone successfully:
vtk
, vtkpython
, , other vtk executables appear in ~/local/bin/
directory. vtk libraries appear in ~/local/lib
.
however, when run python -c "import vtk"
, see:
importerror: no module named vtk
so apparently, not correctly pointing else, although i'm not sure i'm missing since i've followed build directions.
here value of particular shell variable seems show on related question:
echo $ld_library_path => ~/local/lib
check python module. in system (where vtk not built following instructions, should not different) there folder in lib/python2.6/site-packages/vtk/ , contains __init__.py
, vtk classes (e.g vtkcommoncore.py , vktcommoncorepython.so ..). if find folder, add parent folder pythonpath environment variable (or in python distribution site-packages folder, create file vtk.pth contains folder). so, in system, have:
export pythonpath=/mypath/install/lib/python2.6/site-packages/:$pythonpath
see http://www.vtk.org/wiki/vtk/tutorials/pythonenvironmentsetup
Comments
Post a Comment