[vtkusers] Problem VTK4 + python 2.2

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Mon Jan 14 06:13:51 EST 2002


>>>>> "JP" == Jose Paulo Moitinho de Almeida <moitinho at civil.ist.utl.pt> writes:

    JP> Great. It works now, using:

    JP> PYTHONPATH
    JP> $HOME/software/vtk/VTK/Wrapping/Python:$HOME/software/vtk/k7/bin
    JP> LD_LIBRARY_PATH $HOME/software/vtk/k7/bin

    JP> I just wonder: is there a cleaner way? It is just a problem of
    JP> my configuration or the files in VTK/Wrapping/Python don't get
    JP> installed by a "make install"?

Make install simply installs the libraries.  It doesn't install the
python modules in Wrapping/Python anywhere.

The problem occurs because the either Python or the linker is confused
by two sets of the same libraries in different places.  So, if you
want to use LD_LIBRARARY_PATH's then you have to be careful that the
same library isn't present in the linkers default path somewhere
else.  I usually dont install the libraries when I build from source.
Instead, I source a simple script that sets the PYTHONPATH and LIB
PATH correctly.

One more point to note: you need to put both the Wrapping/Python and
bin dir in your PYTHONPATH.  You could eliminate this by making links
from the Wrapping/Python dir to all the actual libs in the bin dir.
Like so:

ln -s $HOME/software/vtk/k7/bin/libvtk*Python*.so $HOME/software/vtk/VTK/Wrapping/Python/

If you do that you will not need to put the bin dir in your
PYTHONPATH.

prabhu



More information about the vtkusers mailing list