[vtkusers] Problems with vtkpython

Corinne Bachmann corinne at sed.ethz.ch
Wed Dec 12 09:37:09 EST 2007


Dear all

I installed vtk and enabled VTK_WRAP_PYTHON to be able to write vtk
codes in python. Ccmake and make install resulted in no error messages,
when I first tried to run vtkpython it resulted in:
vtkpython: error while loading shared libraries: libvtksys.so.5.0:
cannot open shared object file: No such file or directory

but I managed to fix that with the help of the mailing list archive.
When I use vtkpython now it starts up as a normal python enviroment, but
none of the vtkmodules seem to work. I was trying an example from this
website: http://www.imaging.robarts.ca/~dgobbi/vtk/vtkpython.html but
already the first line results in an error:
from libVTKCommonPython import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named libVTKCommonPython

I thought then I don't have to import the modules as I am already using
vtkpython and not python, but skipping the import steps just resulted
in:
ren = vtkRenderer()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'vtkRenderer' is not defined

So it seems that I forgot some links to the vtk somewhere, but I don't
know where. Any help would be very much appreciated.

Cheerz,
Corinne




More information about the vtkusers mailing list