diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py index 01f7bd62be6..5575379b8b2 100644 --- a/lib/spack/spack/build_systems/python.py +++ b/lib/spack/spack/build_systems/python.py @@ -173,7 +173,7 @@ def test_imports(self): # Make sure we are importing the installed modules, # not the ones in the source directory - python = inspect.getmodule(self).python.path + python = inspect.getmodule(self).python for module in self.import_modules: with test_part( self,