[vtkusers] installing vtk on RHEL; fails to find Python.h

Rahul Nabar rpnabar at gmail.com
Wed May 28 15:29:17 EDT 2008


On Wed, May 28, 2008 at 8:40 AM, Amy Squillacote <ahs at cfdrc.com> wrote:

> Is Python.h in your /usr/local/lib/python2.4 directory? If not, set
> PYTHON_INCLUDE_PATH to the directory containing this file. Also,
> PYTHON_LIBRARY should be set to the full path to the python library,
> including the library name (probably something ending in .a or .so).

Hi Amy,

Thanks for those tips. I set the PYTHON_INCLUDE_PATH and also the TCL
and TK paths and now the cmake was perfect. No errors. The compilation
proceeded 98% and then I had a new error.

I****************************************************************************************
[ 98%] Building CXX object
Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.o
Linking CXX executable ../../bin/vtkpython
CMakeFiles/vtkpython.dir/vtkPythonAppInit.o: In function
`vtkPythonAppInitPrependPythonPath(char const*)':
vtkPythonAppInit.cxx:(.text+0x366): undefined reference to `PySys_GetObject'
vtkPythonAppInit.cxx:(.text+0x3a3): undefined reference to `PyString_FromString'
vtkPythonAppInit.cxx:(.text+0x3c0): undefined reference to `PyList_Insert'
CMakeFiles/vtkpython.dir/vtkPythonAppInit.o: In function `main':
vtkPythonAppInit.cxx:(.text+0x814): undefined reference to `Py_SetProgramName'
vtkPythonAppInit.cxx:(.text+0x819): undefined reference to `Py_Initialize'
vtkPythonAppInit.cxx:(.text+0x849): undefined reference to `PySys_GetObject'
vtkPythonAppInit.cxx:(.text+0x857): undefined reference to `PyString_AsString'
vtkPythonAppInit.cxx:(.text+0x933): undefined reference to `Py_Main'
collect2: ld returned 1 exit status
make[2]: *** [bin/vtkpython] Error 1
make[1]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2
make: *** [all] Error 2

****************************************************************************************

I am not sure where I should point my PYTHON_LIBRARY to.    I was
pointing to /CMake/libcmVTK_WRAP_PYTHON2.so  Is that the right place?

Maybe you can tell me a filename that resides in PYTHON_LIBRARY so
that I can run a 'locate filename.so' and find my correct path.

-- 
Rahul



More information about the vtkusers mailing list