An error when I compile gtsam
When I run
cmake .. , I got errors in the picture.
Can you tell me how to fix this problem?
cd gtsam/cmake/FindCython.cmake
vim FindCython.cmake
Use the Cython executable that lives next to the Python executable
if it is a local installation.
find_package( PythonInterp ) if ( PYTHONINTERP_FOUND ) execute_process( COMMAND "${PYTHON_EXECUTABLE}" "-c" "import Cython; print(Cython.path)" _#print Cython._path-> print(Cython.path) RESULT_VARIABLE RESULT OUTPUT_VARIABLE CYTHON_PATH OUTPUT_STRIP_TRAILING_WHITESPACE ) endif ()
RESULT=0 means ok
if ( NOT RESULT ) get_filename_component( _python_path ${PYTHON_EXECUTABLE} PATH ) find_program( CYTHON_EXECUTABLE NAMES cython cython.bat cython3 HINTS ${_python_path} ) endif ()
RESULT=0 means ok
if ( NOT RESULT ) execute_process( COMMAND "${PYTHON_EXECUTABLE}" "-c" "import Cython; print(Cython.version)" _#print Cython._path-> print(Cython.path) RESULT_VARIABLE RESULT OUTPUT_VARIABLE CYTHON_VAR_OUTPUT ERROR_VARIABLE CYTHON_VAR_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE ) if ( RESULT EQUAL 0 ) string( REGEX REPLACE ".* ([0-9]+\.[0-9]+(\.[0-9]+)?).*" "\1" CYTHON_VERSION "${CYTHON_VAR_OUTPUT}" ) endif () endif ()
include( FindPackageHandleStandardArgs ) find_package_handle_standard_args( Cython FOUND_VAR CYTHON_FOUND REQUIRED_VARS CYTHON_PATH CYTHON_EXECUTABLE VERSION_VAR CYTHON_VERSION )