diff --git a/bin/compile b/bin/compile
index fd8edc3fb09795e56df52a220bf7d1dcb0786bcb..2509eac82550b1fbf1b35923fb276c406139843b 100755
--- a/bin/compile
+++ b/bin/compile
@@ -115,6 +115,7 @@ fi
 
 if (grep -Fiq "hg+" requirements.txt) then
   PIP_DOWNLOAD_CACHE=$PIP_DOWNLOAD_CACHE bin/pip install --use-mirrors mercurial | indent
+  source bin/activate
 fi
 
 echo "-----> Installing dependencies using pip version $(bin/pip --version | awk '{print $2}')"