[vtkusers] vtk import fails from python

Rahul Nabar rpnabar at gmail.com
Thu May 29 12:57:18 EDT 2008


On Thu, May 29, 2008 at 7:39 AM, Eric E. Monson <emonson at cs.duke.edu> wrote:

> The LD_LIBRARY_PATH and PYTHONPATH would need to be set before you use VTK
> in Python. The setup.py should be run automatically when you run 'make
> install' for the VTK build if you are using something UNIXy.

Thanks for your suggestions Eric. I've made some progress now:  import
vtk works. But I still cannot import some objects eg.
vtkTkRenderWidget. I think this might be because I don't have tkinter
installed?


> Can you import vtk from within the vtkpython that is built along with VTK?

Yes. And I can import vtkTkRenderWidget too. I just cannot import it
if I use simply python.

> What platform are you using (so someone with specific experience might be
> able to chime in).

I'm on RHEL. I have both Python 2.4.3 (RHEL yum comes with the older
version) and Python 2.4.4 on my system.

-- 
Rahul



More information about the vtkusers mailing list