[vtkusers] problem with VTK's Python bindings

David Gobbi david.gobbi at gmail.com
Sun Feb 19 14:21:21 EST 2012


Hi Yifei,

This isn't a python issue, it's a Qt issue: the undefined symbol is in
libQVTK.so.

 - David


On Sun, Feb 19, 2012 at 8:18 AM, Yifei Li <yifli82 at gmail.com> wrote:
> Here's the more information from 'python -v'
>
>>>> import vtk
> import vtk # directory
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk
> #
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/__init__.pyc
> matches
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/__init__.py
> import vtk # precompiled from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/__init__.pyc
> dlopen("/usr/lib/python2.6/lib-dynload/dlmodule.so", 2);
> import dl # dynamically loaded from
> /usr/lib/python2.6/lib-dynload/dlmodule.so
> #
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/__helper.pyc
> matches
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/__helper.py
> import vtk.__helper # precompiled from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/__helper.pyc
> # /usr/lib/python2.6/string.pyc matches /usr/lib/python2.6/string.py
> import string # precompiled from /usr/lib/python2.6/string.pyc
> dlopen("/usr/lib/python2.6/lib-dynload/stropmodule.so", 2);
> import strop # dynamically loaded from
> /usr/lib/python2.6/lib-dynload/stropmodule.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkCommonPython.so",
> 102);
> import vtk.vtkCommonPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkCommonPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkFilteringPython.so",
> 102);
> import vtk.vtkFilteringPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkFilteringPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkIOPython.so",
> 102);
> import vtk.vtkIOPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkIOPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkImagingPython.so",
> 102);
> import vtk.vtkImagingPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkImagingPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkGraphicsPython.so",
> 102);
> import vtk.vtkGraphicsPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkGraphicsPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkGenericFilteringPython.so",
> 102);
> import vtk.vtkGenericFilteringPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkGenericFilteringPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkRenderingPython.so",
> 102);
> import vtk.vtkRenderingPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkRenderingPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkVolumeRenderingPython.so",
> 102);
> import vtk.vtkVolumeRenderingPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkVolumeRenderingPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkHybridPython.so",
> 102);
> import vtk.vtkHybridPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkHybridPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkWidgetsPython.so",
> 102);
> import vtk.vtkWidgetsPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkWidgetsPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkChartsPython.so",
> 102);
> import vtk.vtkChartsPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkChartsPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkGeovisPython.so",
> 102);
> import vtk.vtkGeovisPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkGeovisPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkInfovisPython.so",
> 102);
> import vtk.vtkInfovisPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkInfovisPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkViewsPython.so",
> 102);
> import vtk.vtkViewsPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkViewsPython.so
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkParallelPython.so",
> 102);
> import vtk.vtkParallelPython # dynamically loaded from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkParallelPython.so
> # /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/qvtk.pyc
> matches
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/qvtk.py
> import vtk.qvtk # precompiled from
> /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/qvtk.pyc
> dlopen("/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/vtkQtPython.so",
> 102);
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> "/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/__init__.py",
> line 124, in <module>
>     __helper.refine_import_err('qvtk', 'vtkQtPython', exc)
>   File
> "/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/__helper.py",
> line 32, in refine_import_err
>     raise LinkError, str(exc)
> vtk.__helper.LinkError: /tmp/yifli/lib/vtk-5.8/libQVTK.so.5.8: undefined
> symbol:
> _ZN19QAbstractProxyModel11setItemDataERK11QModelIndexRK4QMapIi8QVariantE
>
> On Sat, Feb 18, 2012 at 9:26 PM, Yifei Li <yifli82 at gmail.com> wrote:
>>
>> Hi all,
>>
>> First of all, I did successfully compile and install VTK, as it can be
>> seen from the following message
>>
>> Installed /tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg
>>
>>
>> However , when I try to import vtk, I got the following error:
>>
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File
>> "/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/__init__.py",
>> line 124, in <module>
>>     __helper.refine_import_err('qvtk', 'vtkQtPython', exc)
>>   File
>> "/tmp/yifli/lib/python2.6/site-packages/VTK-5.8.0-py2.6.egg/vtk/__helper.py",
>> line 32, in refine_import_err
>>     raise LinkError, str(exc)
>> vtk.__helper.LinkError: /tmp/yifli/lib/vtk-5.8/libQVTK.so.5.8: undefined
>> symbol:
>> _ZN19QAbstractProxyModel11setItemDataERK11QModelIndexRK4QMapIi8QVariantE
>>
>> And all the tests failed when I run 'ctest -R Python' in the building
>> directory.
>>
>> Any help is highly appreciated.
>>
>> Yifei
>>



More information about the vtkusers mailing list