[vtkusers] Building vtk from source with python binding, Stefan

Stefan Mogck s.mogck at phys.rug.nl
Mon Dec 9 11:48:24 EST 2002


Hallo vtk-users!

I'd like to install MayaVi under linux. For that I have to install VTK first. 
I have problems to get the Python bindings into VTK. I hope I configured 
cmake correctly to bind tk, tcl and python. After the configuration I started 
make and I got the following error message:

mk39:/home/stefan/pythonsource/VTK # make
cmake.depends is up-to-date
/home/stefan/pythonsource/VTK/Wrapping: building default_target
/usr/bin/cmake -S/home/stefan/pythonsource/VTK/Wrapping 
-O/home/stefan/pythonsource/VTK/Wrapping -H/home/stefan/pythonsource/VTK 
-B/home/stefan/pythonsource/VTK
CMake Error: Invalid escape sequence \I
in argument 
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\InstallPath]/include
make[3]: *** [cmake.depends] Error 255
make[2]: *** [default_target] Error 2
make[1]: *** [default_target_Wrapping] Error 2
make: *** [default_target] Error 2

(I am using python2.2 under linux Suse 7.3)
My python is installed under /usr/local/lib/python2.2

This is my FindPythonLibs.cmake file:

#
# This module finds if Python is installed and determines where the
# include files and libraries are. It also determines what the name of
# the library is. This code sets the following variables:
#
#  PYTHON_LIBRARY       = the full path to the library found
#  PYTHON_INCLUDE_PATH  = the path to where tcl.h can be found
#  PYTHON_DEBUG_LIBRARY = the full path to the debug library found
#

IF(WIN32)
  FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
    NAMES python python21_d python20_d
    PATHS
    
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/libs/De
bug
    
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs/De
bug
    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/libs
    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs
  )
ENDIF(WIN32)

FIND_LIBRARY(PYTHON_LIBRARY
  NAMES python python22 python2.2 python20 python2.0 python1.5 python15 
python22
 python2.2
  PATHS
  /usr/lib
  /usr/lib/python1.5/config
  /usr/lib/python2.1/config
  /usr/lib/python2.0/config
  /usr/local/lib/python2.2/config
  /usr/local/lib/python2.2/lib-dynload
  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]/libs
  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs
)

FIND_PATH(PYTHON_INCLUDE_PATH Python.h
  /usr/include
  /usr/include/python1.5
  /usr/include/python2.1
  /usr/include/python2.0
  /usr/local/include/python2.2
  /usr/local/include
  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\InstallPath]/include
  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/include
)

IF (WIN32)
  MARK_AS_ADVANCED(
    PYTHON_DEBUG_LIBRARY
    PYTHON_LIBRARY
    PYTHON_INCLUDE_PATH
"FindPythonLibs.cmake" 52L, 1743C                             1,1           
........

Has anybody an idea what I have to modify. Probably in FindPythonLibs.cmake?


Thanks, Stefan 



More information about the vtkusers mailing list