The PYTHON environment variable will also be checked. You could have Python 3 in the path and specify PYTHON pointing to a Python 2 executable not in the path.