[vtkusers] Problem with Python and VTK

Richard Muller rpm at wag.caltech.edu
Thu Apr 3 17:57:48 EST 2003


I'm having trouble with making Python and VTK work nicely together. I'm 
using Python 2.2.1 and VTK 4.2.1 on a Linux box.

I've built VTK and the python bindings without problems. Most of the 
features in VTK work fine, but when I try to do contours, I get the 
error:

   ValueError: method requires a VTK object.

I found the FAQ entry here:
http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq02.004.htp
that addresses this issue, but the fixes don't work for me.

First, I can't use vtkpython because for some reason it doesn't pick up 
the other modules in my site-packages directory (most notably NumPy).

Secondly, when I either try to rebuild with CMAKE_SKIP_RPATH or when I 
delete the *.so files in the bin directory, then Python can't find the 
*.so files at all. I've run the 'python setup.py install' commands, and 
the libraries are under my site-packages directory, but Python insists 
upon using the version of vtk.py that is in my build directory. It's 
like it remembers it somehow, although I've used 'printenv' to see if 
any env variables are pointing to it, and I can't find any.

I would be grateful for any help anyone can offer.

Rick Muller
rpm at wag.caltech.edu
http://wag.caltech.edu/home/rpm




More information about the vtkusers mailing list