[Trilinos-Users] Appropriate PYTHON_INCLUDE_DIR for pytrilinos build

Bill Spotz wfspotz at sandia.gov
Fri Jul 16 11:50:49 MDT 2010


Cmake is looking for Python.h and does not know where to find it. Do

$ PREFIX = python -c "import sys; print sys.prefix"
$ ls $PREFIX/include/python2.x

Of course, you don't want to use python2.x, but the correct version number instead.

The most likely cause of the problem you are seeing is that Cmake is picking up an installation of python that does not have the include files installed.

On Jul 16, 2010, at 8:21 AM, Scott Askey wrote:

> When I try to build pytrilinos Cmake wants to know the PYTHON_INCLUDE_DIR.  What 
> should be in this directory and where might it be?
> 
> I am building on an amd64 debian squeeze 64 system with all of the dependencies 
> installed from the repositories.
> 
> V/R
> 
> Scott
> 
> -- PyTrilinos_LIBRARIES='pytrilinos'
> 
> Exporting library dependencies ...
> 
> 
> CMake Error: The following variables are used in this project, but they are set 
> to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the CMake 
> files:
> PYTHON_INCLUDE_DIR (ADVANCED)
>   used as include directory in directory 
> /home/cb/src/trilinos-10.4.0-Source/packages/epetraext/src
>   used as include direc
> 
> 
> 
> 
> EXTRA_ARGS=$@
> TRILINOS_PATH=/home/cb/Work/Apps/trilinos/10.4.0
> TRILINOS_HOME=/home/cb/src/trilinos-10.4.0-Source
> 
> cmake  \
>    -D BUILD_SHARED_LIBS=ON  \
> 
> -DPyTrilinos_INSTALL_DIR:PATH=/home/cb/lib/python2.6/site-packages/PyTrilinos \
>    -D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON \
>    -D CMAKE_BUILD_TYPE:STRING=DEBUG \
>    -D TPL_ENABLE_MPI:BOOL=ON \
>    -D BLAS_LIBRARY_DIRS:FILEPATH="/usr/lib/blas" \
>    -D BLAS_LIBRARY_NAMES:STRING="libblas.so.3gf" \
>    -D TPL_ENABLE_LAPACK:STRING=ON \
>    -D TPL_BLAS_LIBRARIES:FILEPATH="/usr/lib/blas/libblas.so.3gf" \
>    -D TPL_LAPACK_LIBRARIES:FILEPATH="/usr/lib/lapack/liblapack.so.3gf" \
>    -D LAPACK_LIBRARY_DIRS:FILEPATH="/usr/lib/lapack" \
>    -D LAPACK_LIBRARY_NAMES:STRING="liblapack.so.3gf" \
>    -D Trilinos_ENABLE_DEFAULT_PACKAGES:BOOL=OFF \
>    -D Trilinos_ENABLE_PyTrilinos:BOOL=ON \
>    -D Trilinos_ENABLE_Meros:BOOL=ON \
>    -D Trilinos_ENABLE_Epetra:BOOL=ON \
>    -D Trilinos_ENABLE_EpetraExt:BOOL=ON \
>    -D Trilinos_ENABLE_Belos:BOOL=ON \
>    -D Trilinos_ENABLE_Ifpack:BOOL=ON \
>    -D Trilinos_ENABLE_Teuchos:BOOL=ON \
>    -D Trilinos_ENABLE_Amesos:BOOL=ON \
>    -D Trilinos_ENABLE_AztecOO:BOOL=ON \
>    -D Trilinos_ENABLE_Gallery:BOOL=ON \
>    -D Trilinos_ENABLE_ML:BOOL=ON \
>    -D Trilinos_ENABLE_NOX:BOOL=ON \
>    -D Trilinos_ENABLE_ForTrilinos:BOOL=ON \
>    -D Trilinos_ENABLE_TESTS:BOOL=ON \
>    -D Teuchos_ENABLE_MPI:BOOL=ON \
>    -D Teuchos_ENABLE_ABC:BOOL=ON \
>    -D Teuchos_ENABLE_COMPLEX:BOOL=ON \
>    -D Teuchos_ENABLE_EXTENDED:BOOL=ON \
>    -D DART_TESTING_TIMEOUT:STRING=600 \
>    -D Trilinos_EXTRA_LINK_FLAGS:STRING="$FORTRAN_LIBRARIES" \
>    -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE      \
>    -D Trilinos_VERBOSE_CONFIGURE:BOOL=TRUE \
>    $EXTRA_ARGS \
>    ${TRILINOS_HOME}

** Bill Spotz                                              **
** Sandia National Laboratories  Voice: (505)845-0170      **
** P.O. Box 5800                 Fax:   (505)284-0154      **
** Albuquerque, NM 87185-0370    Email: wfspotz at sandia.gov **








More information about the Trilinos-Users mailing list