[vtkusers] VTK Python Wrappers on Red Hat

Chapman, Brian chapbe at pitt.edu
Wed May 20 12:54:21 EDT 2009


We are trying to compile VTK with Python (2.5) wrappers on a machine running
Red Hat Enterprise Linux 5.2. VTK compiles and installs fine, but when
within within Python I try to import vtk I get the following error:

In [1]: import vtk
---------------------------------------------------------------------------
<type 'exceptions.ImportError'>           Traceback (most recent call last)

/home/brian/<ipython console> in <module>()

/usr/local/lib/python2.5/site-packages/vtk/__init__.py in <module>()
     27 
     28 # Load all required kits.
---> 29 from common import *
     30 from filtering import *
     31 from io import *

/usr/local/lib/python2.5/site-packages/vtk/common.py in <module>()
      5 
      6 if os.name == 'posix':
----> 7     from libvtkCommonPython import *
      8 else:
      9     from vtkCommonPython import *

<type 'exceptions.ImportError'>: libvtkCommonPythonD.so.5.0: cannot open
shared object file: No such file or directory

This library is in fact installed in /usr/local/lib

-rwxr-xr-x 1 root root 5208962 May 20 11:23 libvtkCommonPythonD.so.5.0.4
lrwxrwxrwx 1 root root      28 May 20 11:23 libvtkCommonPythonD.so.5.0 ->
libvtkCommonPythonD.so.5.0.4
lrwxrwxrwx 1 root root      26 May 20 11:23 libvtkCommonPythonD.so ->
libvtkCommonPythonD.so.5.0

The vtk directory under site-packages also contains a libvtkCommonPython
library:

-rwxr-xr-x 1 root root 86742 May 20 11:11 libvtkCommonPython.so

Is there something obvious we are missing in the installation process?
Confused.

Brian






More information about the vtkusers mailing list