diff --git a/bin/spack b/bin/spack
index 7c911ce9f226bcf4e69e3b608d80414f54974ec7..a7ebb8d1611220a17cf9dc49b05be35850da36ac 100755
--- a/bin/spack
+++ b/bin/spack
@@ -1,10 +1,26 @@
-#!/usr/bin/env python
+#!/bin/sh
+# -*- python -*-
 #
 # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
 # Spack Project Developers. See the top-level COPYRIGHT file for details.
 #
 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
 
+# This file is bilingual. The following shell code finds our preferred python.
+# Following line is a shell no-op, and starts a multi-line Python comment.
+# See https://stackoverflow.com/a/47886254
+""":"
+# prefer python3, then python, then python2
+for cmd in python3 python python2; do
+   command -v > /dev/null $cmd && exec $cmd $0 "$@"
+done
+
+echo "==> Error: spack could not find a python interpreter!" >&2
+exit 1
+":"""
+# Line above is a shell no-op, and ends a python multi-line comment.
+# The code above runs this file with our preferred python interpreter.
+
 from __future__ import print_function
 
 import os