From 6547d2564d7589471758661bb60c93a156c7f3cb Mon Sep 17 00:00:00 2001 From: Feiyu Chan Date: Tue, 28 Jun 2022 19:06:20 +0800 Subject: [PATCH] change the condition to find python interpreter to avoid skipping the find process. (#43888) * change to condition to find python interpreter to avoid skipping the find process. PYTHONINTERP_FOUND is the best signal that python interpreter is found. --- paddle/phi/api/lib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/phi/api/lib/CMakeLists.txt b/paddle/phi/api/lib/CMakeLists.txt index 0bec8f44fe3..d01d6273dd0 100644 --- a/paddle/phi/api/lib/CMakeLists.txt +++ b/paddle/phi/api/lib/CMakeLists.txt @@ -95,7 +95,7 @@ set(wrapped_infermeta_header_file set(wrapped_infermeta_source_file ${CMAKE_SOURCE_DIR}/paddle/phi/infermeta/generated.cc) -if(NOT PYTHON_EXECUTABLE) +if(NOT PYTHONINTERP_FOUND) find_package(PythonInterp REQUIRED) endif() -- GitLab