[vtkusers] Re: Installation Problems

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Jun 20 13:05:34 EDT 2002

>>>>> "TW" == Thomas Werner <thomasvw at rogers.com> writes:

    TW> I tried Mathieus suggestion, and indeed my PYTHONPATH was
    TW> unset.
    TW> I did the following:
    TW> setenv PYTHONPATH "/usr/lib/python2.2:/usr/lib/vtk/python"

    TW> and ran the test, which failed, giving me the following:

    TW> [thomas at Guiness ~]$ python test_vtk.py 'import site' failed;
    TW> use -v for traceback Traceback (innermost last): File
    TW> "test_vtk.py", line 3, in ?  import sys, traceback, re File
    TW> "/usr/lib/python2.2/traceback.py", line 3, in ?  import
    TW> linecache File "/usr/lib/python2.2/linecache.py", line 9, in ?
    TW> import os File "/usr/lib/python2.2/os.py", line 38 return [n
    TW> for n in dir(module) if n[0] != '_'] ^ SyntaxError: invalid

Looks like you have multiple versions of Python installed and are
running an older Python which is using the newer versions modules.
You should not set /usr/lib/python2.2 in your PYTHONPATH at all.  Just
point it to /usr/lib/vtk/python (if at all that is needed).  Also if
your VTK Python was built with Python 2.2 then you should run
python2.2 and not plain python i.e.

$ python2.2 test_vtk.py


More information about the vtkusers mailing list