diff options
-rw-r--r-- | lib/spack/spack/util/module_cmd.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/util/module_cmd.py b/lib/spack/spack/util/module_cmd.py index 4ff6b0de43..d203670769 100644 --- a/lib/spack/spack/util/module_cmd.py +++ b/lib/spack/spack/util/module_cmd.py @@ -9,6 +9,7 @@ parsing environment modules. """ import subprocess import os +import sys import json import re @@ -31,7 +32,7 @@ def module(*args): if args[0] in module_change_commands: # Do the module manipulation, then output the environment in JSON # and read the JSON back in the parent process to update os.environ - module_cmd += ' >/dev/null; python -c %s' % py_cmd + module_cmd += ' >/dev/null;' + sys.executable + ' -c %s' % py_cmd module_p = subprocess.Popen(module_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, |