diff --git a/xfel_calibrate/calibrate.py b/xfel_calibrate/calibrate.py
index fefa301126f4c9e7aff11d497aa0eab940f67d34..f8f107ffb2d21da70dd66c48108c2be68c2b449d 100755
--- a/xfel_calibrate/calibrate.py
+++ b/xfel_calibrate/calibrate.py
@@ -377,7 +377,8 @@ def concurrent_run(temp_path, nb, nbname, args, cparm=None, cval=None,
         with open("{}/finalize.sh".format(temp_path), "w") as finfile:
                 finfile.write("#!/bin/tcsh\n")
                 finfile.write("module load texlive/2017\n")
-                finfile.write("module load anaconda/3\n")
+                finfile.write("PyExe=$(which python)\n")
+                finfile.write("if [[ $PyExe != *"karabo"* ]]; then module load anaconda/3; fi\n")
                 finfile.write("echo 'Running finalize script'\n")           
                 finfile.write("python3 -c {}\n".format(fmtcmd.format(joblist=job_list)))
         all_stats = stat.S_IXUSR | stat.S_IWUSR | stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH