diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index b40f68b2c5..225c65917a 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -282,7 +282,7 @@ def find_in_modules(cls): modulecmd = which('modulecmd') modulecmd.add_default_arg('python') - output = modulecmd('avail', return_oe=True) + output = modulecmd('avail', cls.PrgEnv_compiler, return_oe=True) matches = re.findall(r'(%s)/(\d+[\.\d]+)' % cls.PrgEnv_compiler, output) for name, version in matches: