diff --git a/heptapod/assets/install_heptapod.py b/heptapod/assets/install_heptapod.py
index 3d43b3d6da2b38934b1593f4dbfd9474c319f7e7_aGVwdGFwb2QvYXNzZXRzL2luc3RhbGxfaGVwdGFwb2QucHk=..832e4e2123e4e237926596fe8455a45d4caaf445_aGVwdGFwb2QvYXNzZXRzL2luc3RhbGxfaGVwdGFwb2QucHk= 100644
--- a/heptapod/assets/install_heptapod.py
+++ b/heptapod/assets/install_heptapod.py
@@ -338,6 +338,9 @@
 
     upgrade_pip(python=python)
 
+    py_heptapod = revisions.get('py-heptapod')
+    if py_heptapod is not None:
+        hgpip(python=python, target=PY_HEPTAPOD_REPO, **py_heptapod)
     apply_pip_requirements(python=python)
 
     hg_git = revisions.get('hg-git')
@@ -346,9 +349,6 @@
     logging_mod = revisions.get('hgext-loggingmod')
     if logging_mod is not None:
         hgpip(python=python, target=LOGGINGMOD_REPO, **logging_mod)
-    py_heptapod = revisions.get('py-heptapod')
-    if py_heptapod is not None:
-        hgpip(python=python, target=PY_HEPTAPOD_REPO, **py_heptapod)
 
     fixup_hgrc_inclusion("/opt/gitlab/etc/docker.hgrc", python=python)