--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,9 @@
 endif()
 
 find_package(Python REQUIRED COMPONENTS Interpreter Development)
+get_filename_component( PYTHON_DIR ${Python_EXECUTABLE} DIRECTORY )
+get_filename_component( PYTHON_PREFIX "${PYTHON_DIR}/.." REALPATH )
+string( REPLACE "${PYTHON_PREFIX}/" "" Python_SITEARCH ${Python_SITEARCH} )
 
 if (NOT PIVY_Python_SITEARCH)
     SET(PIVY_Python_SITEARCH ${Python_SITEARCH})
