diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8f3335766a59cd30f983abed2dc812ce2cd57f4b..fc710b579a00769d1d5d0e2b893756f8f97766c1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -49,7 +49,7 @@ python-2.7:
   stage: test
   image: bilbydev/bilby-test-suite-python27
   script:
-    - python setup.py install
+    - python -m pip install .
     # Run tests without finding coverage
     - pytest --ignore=test/utils_py3_test.py
 
@@ -58,7 +58,7 @@ python-3.7:
   stage: test
   image: bilbydev/bilby-test-suite-python37
   script:
-    - python setup.py install
+    - python -m pip install .
 
     # Run pyflakes
     - flake8 .
@@ -86,7 +86,7 @@ scheduled-python-3.7:
   only:
     - schedules
   script:
-    - python setup.py install
+    - python -m pip install .
 
     # Run tests which are only done on schedule
     - pytest test/example_test.py