[vtkusers] newbie problems with vtk4.0/python on irix

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Sun Jan 6 12:53:50 EST 2002


>>>>> "PS" == P Sherwood <P.Sherwood at dl.ac.uk> writes:

    PS> Hi, I am having trouble getting started with VTK & Python on
    PS> an SGI (R4400 processor, Irix 6.5).  I have downloaded and
    PS> built VTK (version 4.0) with the python bindings but I am not
    PS> sure how to prepare Python to import the vtk modules.  I found
    PS> a comment in VTK/Wrapping/Python/vtk/README.txt that PYTHON
    PS> path should include the VTK/Wrapping/Python directory. When I
    PS> tried this the higher level import started, but the lower
    PS> level kits were not found:
[snip]
    PS> I then looked for files that could be loaded for
    PS> libvtkCommonPython, the only thing I could find was
    PS> libvtkCommonPython.so was in the bin directory, so tried
    PS> adding this to PYTHONPATH. The load is attempted but fails as
    PS> follows:

Yes, you need to put the Wrapping/Python and the bin directories in
your PYTHONPATH.

    PS> % setenv PYTHONPATH
    PS> "/scr1/psh/Python-2.2/lib/python2.2:/scr1/psh/vtk/VTK/Wrapping/Python:/\scr1/psh/vtk/VTK/bin"

That does not look correct (I hope its a typo), it should read:

setenv PYTHONPATH "/scr1/psh/Python-2.2/lib/python2.2:/scr1/psh/vtk/VTK/Wrapping/Python:/scr1/psh/vtk/VTK/bin"

    PS> % python Python 2.2 (#2, Jan 5 2002, 16:27:46) [C] on irix6
    PS> Type "help", "copyright", "credits" or "license" for more
    PS> information.
    >>>> from vtkpython import *
    PS> Fatal Python error: Interpreter not initialized (version
    PS> mismatch?)  Abort (core dumped)

Thats strange.  What options did you set in the CMakeCache.txt.  Here
is a part of my setup:

----------
//Where can one of the python, python21_d or python20_d libraries
// be found
PYTHON_DEBUG_LIBRARY:FILEPATH=

//What is the path where the file Python.h can be found
PYTHON_INCLUDE_PATH:PATH=/usr/local/include/python2.1

//Where can one of the python, python21, python2.1, python20 or
// python2.0 libraries be found
PYTHON_LIBRARY:FILEPATH=
----------

Note that I don't explicitly set a PYTHON_LIBRARY.  I've run into
problems earlier when I did link to libpython*.a

Hope this helpsm
prabhu



More information about the vtkusers mailing list