diff --git a/cmake/multipython/PyDependences.cmake b/cmake/multipython/PyDependences.cmake
index f72276b59ab66e76655f3836f6eebfbc70089fb8..8c678c80057df6f4487a24568098f04c51e38162 100644
--- a/cmake/multipython/PyDependences.cmake
+++ b/cmake/multipython/PyDependences.cmake
@@ -24,8 +24,7 @@ message(STATUS "Searching required Python packages...")
 foreach(pkg pip numpy matplotlib)
     message(STATUS "Python package ${pkg}")
     execute_process(
-        COMMAND ${Python3_EXECUTABLE}
-        ${CMAKE_SOURCE_DIR}/cmake/tests/find_pkg.py ${pkg}
+        COMMAND ${Python3_EXECUTABLE} -c "import ${pkg}"
         RESULT_VARIABLE PKG_FOUND)
     if(NOT PKG_FOUND EQUAL 0)
         message(FATAL_ERROR "Python package '${pkg}' not found")