DRL_graph_exploration icon indicating copy to clipboard operation
DRL_graph_exploration copied to clipboard

An error when I compile gtsam

Open yabanbingliang opened this issue 1 year ago • 1 comments

2024-06-18_21-35 When I run cmake .. , I got errors in the picture. Can you tell me how to fix this problem?

yabanbingliang avatar Jun 18 '24 13:06 yabanbingliang

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 )

penghongc avatar Dec 03 '24 09:12 penghongc