[vtkusers] Strange problem with Python

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Apr 17 13:39:50 EDT 2003


>>>>> "HS" == Harris Scott R Civ AFRL/SNJM <Scott.Harris at wpafb.af.mil> writes:

    HS> 1. If I try to import the libs from an interactive session,
    HS> things work perfectly.  2. I have two different sets of VTK
    HS> libraries. The 4.2.2 release and the CVS version. I export
    HS> PYTHONPATH to point to the version I want to use. I keep
    HS> everything in the VTK directory.

How about LD_LIBRARY_PATH?  The linker caches library accesses so its
possible that it is confused between the two libraries.  VTK does not
version its libaries and this can cause heartaches.

    HS> The strange thing is that both the CVS and 4.2.2 demos work. I

Thats most probably because the demos are simple and aren't exercising
the different libs enough.

    HS> can write a short test program and it works. Only my app
    HS> (which is quite large) has problems with importing the CVS
    HS> version of VTK. The 4.2.2 version works perfectly with my
    HS> app. Only the CVS version has problems.

That makes sense.  It sounds like the CVS Python modules are getting
symbols from the 4.2.2 version and not finding what they need.  A
simple test to see if this hypothesis is right.  Just move out *ALL*
the 4.2.2 libraries and libvtk*Python.so's to another directory not in
the linkers path or in LD_LIBRARY_PATH.  Re-run ldconfig if necessary
and now try running your app and see if that works.

cheers,
prabhu



More information about the vtkusers mailing list