--- setup.py.orig	2021-07-28 13:18:29.000000000 +0300
+++ setup.py	2021-07-28 13:55:30.000000000 +0300
@@ -133,6 +133,8 @@
 	# Build cmake call
 	abs_prefix = os.path.join(os.getcwd(), install_prefix)
 	comp_cmd = ["cmake","-DCMAKE_BUILD_TYPE=Release"]
+	comp_cmd.append("-DPython_EXECUTABLE=@PYTHONBIN@")
+	comp_cmd.append("-DPython3_EXECUTABLE=@PYTHONBIN@")
 	comp_cmd.append("-DCMAKE_INSTALL_PREFIX="+abs_prefix)
 	comp_cmd.append("-DCMAKE_CXX_COMPILER="+cmakeCompiler)
 	comp_cmd.append("-DNETWORKIT_FLATINSTALL=ON")
