diff --git a/gitlab/before_build.sh b/gitlab/before_build.sh
index cc0203e87901c54b24456780abb9a71794b229c5..9f090eccb288ab067390a6a969f21763328f08ed 100755
--- a/gitlab/before_build.sh
+++ b/gitlab/before_build.sh
@@ -30,7 +30,7 @@ else
 fi
 
 # Upgrade wheel generation library to avoid bugs
-run_cmd ${use_pip} install --upgrade wheel
+run_cmd ${use_pip} install --upgrade setuptools pip wheel
 
 use_python=`which python`
 if [ -z "${use_python}" ]; then