[vtkusers] Python VTK import errors (since upgrade to Ubuntu 8.04)

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu Aug 14 09:33:15 EDT 2008


Hans,

On Wed, Aug 13, 2008 at 2:01 PM, Hans-Uwe Rempler
<rempler at mechbau.uni-stuttgart.de> wrote:
> Hi everybody,
>
> since my last system upgrade to Ubuntu 8.04 i'm getting strange errors
> from "import vtk", even for the standard VTK examples:
>
> ---
> % pwd
> /usr/share/vtk/GUI/Python
>
> % python SphereWidget.py
> Traceback (most recent call last):
>  File "SphereWidget.py", line 6, in <module>
>    import vtk
>  File "/var/lib/python-support/python2.5/vtk/__init__.py", line 30, in
> <module>
>    from filtering import *
>  File "/var/lib/python-support/python2.5/vtk/filtering.py", line 7, in
> <module>
>    from libvtkFilteringPython import *
> ImportError: /usr/lib/libvtkFilteringPythonD.so.5.0: undefined symbol:
> _ZN13vtkDataObject26GetAssociationTypeAsStringEi
> ---

Looks like a build mismatch.

What does the following command return on your system:

$ nm -D /usr/lib/libvtkFiltering.so.5.0 | grep
_ZN13vtkDataObject26GetAssociationTypeAsStringEi

It needs to be a 'T' symbol.

then make sure that /usr/lib/libvtkFilteringPythonD.so.5.0 links to
/usr/lib/libvtkFiltering.so.5.0 (use ldd).

You may also want to use 'python -v' so that you can check which
library is actually dlopen'ed. For instance it needs to be
'/usr/lib/libvtkFiltering.so.5.0' and not something like
'/my/other/exotic/path/to/libvtkFiltering.so.5.0'

2cts
-- 
Mathieu



More information about the vtkusers mailing list