diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 348efd61ce02e8cd328095ffab03741a843c5a7f..79d4ec2b542f488e22846c3d3edd63bb6ce838b1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,6 +4,7 @@ tests:
     tags:
         - docker
     script:
+        - pip3 install --upgrade setuptools wheel
         - if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
         - pip3 install -e .
         - pip3 install -e .[test]
@@ -23,6 +24,7 @@ doc:
     script:
         - export LC_ALL=$(locale -a | grep en_US)
         - export LANG=$(locale -a | grep en_US)
+        - pip install --upgrade setuptools wheel
         - if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
         - pip3 install -e .
         - pip3 install -e .[doc]
@@ -44,6 +46,7 @@ pages:
     script:
         - export LC_ALL=$(locale -a | grep en_US)
         - export LANG=$(locale -a | grep en_US)
+        - pip install --upgrade setuptools wheel
         - pip3 install -e .[doc]
         - rm -Rf build
         - python3 setup.py build_sphinx