I encountered this problem while CMake compiling. Does anyone know what I should do? Could you please help me take a look.
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_SHARED_LIBS=ON \
-DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.10.0/modules \
-DOPENCV_ENABLE_NONFREE=ON \
-DBUILD_TESTS=ON -DBUILD_PERF_TESTS=ON \
-DOPENCV_GENERATE_PKGCONFIG=ON \
-DWITH_GTK=ON \
-DWITH_CUDA=ON -DENABLE_FAST_MATH=ON -DCUDA_FAST_MATH=ON -D WITH_CUBLAS=ON \
-DCUDA_ARCH_BIN=8.6 \
-DWITH_CUDNN=ON -DOPENCV_DNN_CUDA=ON \
-DWITH_IPP=ON -DWITH_TBB=ON -DWITH_OPENMP=ON -DWITH_PTHREADS_PF=ON \
-DOPENCV_PYTHON3_VERSION=ON \
-DPYTHON3_EXECUTABLE=/usr/bin/python3 \
-DPYTHON3_LIBRARY=$(python3 -c "import sysconfig; from os.path import join; print(join(sysconfig.get_config_var('LIBDIR'), sysconfig.get_config_var('LDLIBRARY')))") \
-DPYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print(numpy.get_include())") \
-DPYTHON3_PACKAGES_PATH=$(python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))") \
-DWITH_OPENGL=ON
-- ocv_init_download: OpenCV source tree is not fetched as git repository. 3rdparty resources will be downloaded from github.com by default.
-- Detected processor: x86_64
CMake Error at cmake/OpenCVUtils.cmake:144 (find_package):
find_package called with invalid argument "ON"
Call Stack (most recent call first):
cmake/OpenCVDetectPython.cmake:58 (find_host_package)
cmake/OpenCVDetectPython.cmake:286 (find_python)
CMakeLists.txt:678 (include)
-- Python is not found: ON EXACT
-- Looking for ccache - not found