diff --git a/var/spack/repos/builtin/packages/python-venv/package.py b/var/spack/repos/builtin/packages/python-venv/package.py index cd0fd84371..a814f47221 100644 --- a/var/spack/repos/builtin/packages/python-venv/package.py +++ b/var/spack/repos/builtin/packages/python-venv/package.py @@ -54,7 +54,8 @@ def bindir(self): @property def command(self): """Returns a python Executable instance""" - return which("python3", path=self.bindir) + python_name = "python" if self.spec.satisfies("platform=windows") else "python3" + return which(python_name, path=self.bindir) def _get_path(self, name) -> str: return self.command(