[vtkusers] VTK4 and Python 2.2 (Newbie): what environment variables to set?

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Wed Feb 6 22:56:02 EST 2002


>>>>> "CE" == Elvis Chen <anisotropic7 at yahoo.ca> writes:

    >>> from vtkpython import *
    CE> Traceback (most recent call last): File "<stdin>", line 1, in
    CE> ?  File
    CE> "/cis/volume/people/chene/local/VTK4/VTK/Wrapping/Python/vtkpython.py",
    CE> line 29, in ?  exec "from "+kit_name+" import *" File
    CE> "<string>", line 1, in ?  ImportError: No module named
    CE> libvtkCommonPython

    CE> my LD_LIBRARY_PATH contains proper path to all vtk libraries,
    CE> but I guess I must have to tell Python the same information
    CE> somehow.

Yes, you also need to set your PYTHONPATH so that the PYTHONPATH
points to the same place where your vtk libraries are.

Lets say your libvtkCommonPython.so is in /usr/local/lib

LD_LIBRARY_PATH=/usr/local/lib

PYTHONPATH=/cis/volume/people/chene/local/VTK4/VTK/Wrapping/Python:/usr/local/lib

That should hopefully fix it.  I know thaat maybe this is a bit
painful, but afaik it can't be helped.

prabhu



More information about the vtkusers mailing list