Skip to content

Commit 6d2de0c

Browse files
committed
Specify python dir manually
1 parent ad192ab commit 6d2de0c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.github/workflows/test_accuracy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
pip install nanobind==2.4.0
4545
pip install typing_extensions==4.12.2
4646
mkdir build && cd build
47-
cmake ../tests/cpp/accuracy/
47+
cmake ../tests/cpp/accuracy/ -DPython_ROOT_DIR=$(python -c "import sys; print(sys.prefix)")
4848
make -j
4949
- name: Run CPP Test
5050
run: |

src/cpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ find_package(OpenCV REQUIRED COMPONENTS core imgproc)
3535

3636
# Looking for OpenVINO in the python distribution. It doesn't work for cross-compiling build
3737
if(NOT CMAKE_CROSSCOMPILING)
38-
set(Python_FIND_VIRTUALENV ONLY)
38+
set(Python_FIND_VIRTUALENV FIRST)
3939
find_package(Python COMPONENTS Interpreter Development REQUIRED)
4040
execute_process(
4141
COMMAND ${Python_EXECUTABLE} -c "from openvino.utils import get_cmake_path; print(get_cmake_path(), end='')"

src/cpp/py_bindings/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33
#
44

5-
set(Python_FIND_VIRTUALENV ONLY)
5+
set(Python_FIND_VIRTUALENV FIRST)
66
find_package(Python COMPONENTS Interpreter Development REQUIRED)
77

88
execute_process(

tests/cpp/accuracy/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ include(../cmake/common.cmake)
6565

6666
find_package(OpenCV REQUIRED COMPONENTS core highgui videoio imgproc imgcodecs)
6767

68-
set(Python_FIND_VIRTUALENV ONLY)
68+
set(Python_FIND_VIRTUALENV FIRST)
6969
find_package(Python REQUIRED)
7070
execute_process(
7171
COMMAND ${Python_EXECUTABLE} -c "from openvino.utils import get_cmake_path; print(get_cmake_path(), end='')"

0 commit comments

Comments
 (0)