--- a/postgresql/documentation/sphinx/build.sh
+++ b/postgresql/documentation/sphinx/build.sh
@@ -30,5 +30,5 @@
 EOF
 
 mkdir -p ../html/doctrees
-sphinx-build -c "$(pwd)" -E -b html -d ../html/doctrees .. ../html
+python3 "$(which sphinx-build)" -c "$(pwd)" -E -b html -d ../html/doctrees .. ../html
 cd ../html && pwd
