[vtkusers] Problems with vtkpython

Alethea Bair abair at viz.tamu.edu
Wed Dec 12 11:09:04 EST 2007

One thing I have found helpful is the sys.path in python

import sys

And look at this string to see if the modules you want to load are in any
of these directories. If they are not then you should edit the PYTHONPATH
environment variable to include whatever path the files are actually in

hope that helps

> 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
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

More information about the vtkusers mailing list