diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c76f0d9392e94e2b70cc84945ffa2bf0ece3fb70..f16c13aadc7412aaeeb6594be7e2d36c8388b551 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,7 +36,8 @@ dist:
     - python setup.py bdist_wheel
     # an alternative approach is to install and run:
     - pip install dist/*
-    # run the command here
+    # remove build directory in order to prevent ImportPathMismatchError
+    - rm -rf build
   artifacts:
     paths:
       - dist/*.whl