Description: change shebang
  find . -type f -name '*.py' -exec sed -i -e 's@#!/usr/bin/env @#!/usr/bin/@g' '{}' \;
  find . -type f -name '*.sh' -exec sed -i -e 's@#!/usr/bin/env @#!/usr/bin/@g' '{}' \;   
  git diff > x.shebang
  cat x.shebang >> debian/patches/shebang.patch
Author: Mo Zhou
Index: pytorch/.circleci/codegen_validation/normalize_yaml_fragment.py
===================================================================
--- pytorch.orig/.circleci/codegen_validation/normalize_yaml_fragment.py
+++ pytorch/.circleci/codegen_validation/normalize_yaml_fragment.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import os
 import sys
Index: pytorch/.circleci/ensure-consistency.py
===================================================================
--- pytorch.orig/.circleci/ensure-consistency.py
+++ pytorch/.circleci/ensure-consistency.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import os
 import subprocess
Index: pytorch/.circleci/generate_config_yml.py
===================================================================
--- pytorch.orig/.circleci/generate_config_yml.py
+++ pytorch/.circleci/generate_config_yml.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 """
 This script is the source of truth for config.yml.
Index: pytorch/.circleci/scripts/binary_upload.sh
===================================================================
--- pytorch.orig/.circleci/scripts/binary_upload.sh
+++ pytorch/.circleci/scripts/binary_upload.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 set -euo pipefail
 
Index: pytorch/.circleci/scripts/build_android_gradle.sh
===================================================================
--- pytorch.orig/.circleci/scripts/build_android_gradle.sh
+++ pytorch/.circleci/scripts/build_android_gradle.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 set -eux -o pipefail
 
 env
Index: pytorch/.circleci/scripts/publish_android_snapshot.sh
===================================================================
--- pytorch.orig/.circleci/scripts/publish_android_snapshot.sh
+++ pytorch/.circleci/scripts/publish_android_snapshot.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 # DO NOT ADD 'set -x' not to reveal CircleCI secret context environment variables
 set -eu -o pipefail
 
Index: pytorch/.circleci/scripts/setup_ci_environment.sh
===================================================================
--- pytorch.orig/.circleci/scripts/setup_ci_environment.sh
+++ pytorch/.circleci/scripts/setup_ci_environment.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 set -ex -o pipefail
 
 # Remove unnecessary sources
Index: pytorch/.circleci/scripts/setup_linux_system_environment.sh
===================================================================
--- pytorch.orig/.circleci/scripts/setup_linux_system_environment.sh
+++ pytorch/.circleci/scripts/setup_linux_system_environment.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 set -eux -o pipefail
 
 # Set up CircleCI GPG keys for apt, if needed
Index: pytorch/.github/scripts/build_publish_nightly_docker.sh
===================================================================
--- pytorch.orig/.github/scripts/build_publish_nightly_docker.sh
+++ pytorch/.github/scripts/build_publish_nightly_docker.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 set -xeuo pipefail
 
Index: pytorch/.github/scripts/ensure_actions_will_cancel.py
===================================================================
--- pytorch.orig/.github/scripts/ensure_actions_will_cancel.py
+++ pytorch/.github/scripts/ensure_actions_will_cancel.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import argparse
 import sys
Index: pytorch/.github/scripts/export_pytorch_labels.py
===================================================================
--- pytorch.orig/.github/scripts/export_pytorch_labels.py
+++ pytorch/.github/scripts/export_pytorch_labels.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 '''
 Test ownership was introduced in https://github.com/pytorch/pytorch/issues/66232.
 
Index: pytorch/.github/scripts/generate_binary_build_matrix.py
===================================================================
--- pytorch.orig/.github/scripts/generate_binary_build_matrix.py
+++ pytorch/.github/scripts/generate_binary_build_matrix.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 """Generates a matrix to be utilized through github actions
 
Index: pytorch/.github/scripts/generate_ci_workflows.py
===================================================================
--- pytorch.orig/.github/scripts/generate_ci_workflows.py
+++ pytorch/.github/scripts/generate_ci_workflows.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 from dataclasses import asdict, dataclass, field
 from pathlib import Path
Index: pytorch/.github/scripts/generate_pytorch_version.py
===================================================================
--- pytorch.orig/.github/scripts/generate_pytorch_version.py
+++ pytorch/.github/scripts/generate_pytorch_version.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import argparse
 import os
Index: pytorch/.github/scripts/gitutils.py
===================================================================
--- pytorch.orig/.github/scripts/gitutils.py
+++ pytorch/.github/scripts/gitutils.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import os
 import re
Index: pytorch/.github/scripts/install_nvidia_utils_linux.sh
===================================================================
--- pytorch.orig/.github/scripts/install_nvidia_utils_linux.sh
+++ pytorch/.github/scripts/install_nvidia_utils_linux.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 set -eou pipefail
 
Index: pytorch/.github/scripts/lint_native_functions.py
===================================================================
--- pytorch.orig/.github/scripts/lint_native_functions.py
+++ pytorch/.github/scripts/lint_native_functions.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 '''
 Verify that it is possible to round-trip native_functions.yaml via ruamel under some
 configuration.  Keeping native_functions.yaml consistent in this way allows us to
Index: pytorch/.github/scripts/parse_ref.py
===================================================================
--- pytorch.orig/.github/scripts/parse_ref.py
+++ pytorch/.github/scripts/parse_ref.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import os
 import re
Index: pytorch/.github/scripts/process_commit.py
===================================================================
--- pytorch.orig/.github/scripts/process_commit.py
+++ pytorch/.github/scripts/process_commit.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 """
 This script finds the user/pr creator responsible for labeling a PR by a commit SHA. It is used by the workflow in
 '.github/workflows/pr-labels.yml'. If there exists no PR associated with the commit or the PR is properly labeled,
Index: pytorch/.github/scripts/report_git_status.sh
===================================================================
--- pytorch.orig/.github/scripts/report_git_status.sh
+++ pytorch/.github/scripts/report_git_status.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 CHANGES=$(git status --porcelain "$1")
 echo "$CHANGES"
 git diff "$1"
Index: pytorch/.github/scripts/test_trymerge.py
===================================================================
--- pytorch.orig/.github/scripts/test_trymerge.py
+++ pytorch/.github/scripts/test_trymerge.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Tests implemented in this file are relying on GitHub GraphQL APIs
 # In order to avoid test flakiness, results of the queries
 # are cached in gql_mocks.json
Index: pytorch/.github/scripts/trymerge.py
===================================================================
--- pytorch.orig/.github/scripts/trymerge.py
+++ pytorch/.github/scripts/trymerge.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import base64
 import json
Index: pytorch/.github/scripts/tryrebase.py
===================================================================
--- pytorch.orig/.github/scripts/tryrebase.py
+++ pytorch/.github/scripts/tryrebase.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import os
 import subprocess
Index: pytorch/.jenkins/pytorch/build-mobile.sh
===================================================================
--- pytorch.orig/.jenkins/pytorch/build-mobile.sh
+++ pytorch/.jenkins/pytorch/build-mobile.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 # DO NOT ADD 'set -x' not to reveal CircleCI secret context environment variables
 set -eu -o pipefail
 
Index: pytorch/.jenkins/pytorch/codegen-test.sh
===================================================================
--- pytorch.orig/.jenkins/pytorch/codegen-test.sh
+++ pytorch/.jenkins/pytorch/codegen-test.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 # This script can also be used to test whether your diff changes any codegen output.
 #
Index: pytorch/.jenkins/pytorch/win-test-helpers/run_python_nn_smoketests.py
===================================================================
--- pytorch.orig/.jenkins/pytorch/win-test-helpers/run_python_nn_smoketests.py
+++ pytorch/.jenkins/pytorch/win-test-helpers/run_python_nn_smoketests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import subprocess
 import os
Index: pytorch/aten/src/ATen/gen_vulkan_glsl.py
===================================================================
--- pytorch.orig/aten/src/ATen/gen_vulkan_glsl.py
+++ pytorch/aten/src/ATen/gen_vulkan_glsl.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import argparse
 import glob
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/configure.py
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/configure.py
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/configure.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/deps/clog/configure.py
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/deps/clog/configure.py
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/deps/clog/configure.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-android-arm64.sh
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-android-arm64.sh
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-android-arm64.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-android-armv7.sh
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-android-armv7.sh
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-android-armv7.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-android-x86.sh
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-android-x86.sh
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-android-x86.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-arm64.sh
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-arm64.sh
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-arm64.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-arm64e.sh
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-arm64e.sh
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-arm64e.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-armv7.sh
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-armv7.sh
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-armv7.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-armv7s.sh
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-armv7s.sh
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-armv7s.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-i386.sh
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-i386.sh
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-i386.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-x86_64.sh
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-x86_64.sh
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-x86_64.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-local.sh
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-local.sh
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-local.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/test-android-arm64.sh
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/test-android-arm64.sh
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/test-android-arm64.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/test-android-armv7.sh
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/test-android-armv7.sh
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/test-android-armv7.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/test-android-x86.sh
===================================================================
--- pytorch.orig/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/test-android-x86.sh
+++ pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/scripts/test-android-x86.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 #
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/aten/src/ATen/nnapi/codegen.py
===================================================================
--- pytorch.orig/aten/src/ATen/nnapi/codegen.py
+++ pytorch/aten/src/ATen/nnapi/codegen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 """
 Code generator for NNAPI wrapper.  We can't link directly against
 libneuralnetworks.so because we want PyTorch to work on Android
Index: pytorch/benchmarks/distributed/ddp/benchmark.py
===================================================================
--- pytorch.orig/benchmarks/distributed/ddp/benchmark.py
+++ pytorch/benchmarks/distributed/ddp/benchmark.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 #
 # Measure distributed training iteration time.
 #
Index: pytorch/benchmarks/distributed/ddp/diff.py
===================================================================
--- pytorch.orig/benchmarks/distributed/ddp/diff.py
+++ pytorch/benchmarks/distributed/ddp/diff.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 #
 # Computes difference between measurements produced by ./benchmark.py.
 #
Index: pytorch/binaries/bench_gen/bench_gen.py
===================================================================
--- pytorch.orig/binaries/bench_gen/bench_gen.py
+++ pytorch/binaries/bench_gen/bench_gen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import argparse
 import ast
Index: pytorch/caffe2/contrib/gloo/gloo_test.py
===================================================================
--- pytorch.orig/caffe2/contrib/gloo/gloo_test.py
+++ pytorch/caffe2/contrib/gloo/gloo_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 
 
Index: pytorch/caffe2/core/nomnigraph/op_gen.py
===================================================================
--- pytorch.orig/caffe2/core/nomnigraph/op_gen.py
+++ pytorch/caffe2/core/nomnigraph/op_gen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 
 
Index: pytorch/caffe2/proto/gen_proto_typestubs.sh
===================================================================
--- pytorch.orig/caffe2/proto/gen_proto_typestubs.sh
+++ pytorch/caffe2/proto/gen_proto_typestubs.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 # Generate type stubs for .proto definition files.
 
Index: pytorch/caffe2/python/allcompare_test.py
===================================================================
--- pytorch.orig/caffe2/python/allcompare_test.py
+++ pytorch/caffe2/python/allcompare_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 
 
Index: pytorch/caffe2/python/benchmark_generator.py
===================================================================
--- pytorch.orig/caffe2/python/benchmark_generator.py
+++ pytorch/caffe2/python/benchmark_generator.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 
 
Index: pytorch/caffe2/python/fakefp16_transform_lib.py
===================================================================
--- pytorch.orig/caffe2/python/fakefp16_transform_lib.py
+++ pytorch/caffe2/python/fakefp16_transform_lib.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 
 
Index: pytorch/caffe2/python/lazy_dyndep_test.py
===================================================================
--- pytorch.orig/caffe2/python/lazy_dyndep_test.py
+++ pytorch/caffe2/python/lazy_dyndep_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 
 
Index: pytorch/caffe2/python/operator_test/alias_with_name_test.py
===================================================================
--- pytorch.orig/caffe2/python/operator_test/alias_with_name_test.py
+++ pytorch/caffe2/python/operator_test/alias_with_name_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import caffe2.python.hypothesis_test_util as hu
 import hypothesis.strategies as st
Index: pytorch/caffe2/python/operator_test/async_net_barrier_test.py
===================================================================
--- pytorch.orig/caffe2/python/operator_test/async_net_barrier_test.py
+++ pytorch/caffe2/python/operator_test/async_net_barrier_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import caffe2.python.hypothesis_test_util as hu
 import hypothesis.strategies as st
Index: pytorch/caffe2/python/operator_test/unsafe_coalesce_test.py
===================================================================
--- pytorch.orig/caffe2/python/operator_test/unsafe_coalesce_test.py
+++ pytorch/caffe2/python/operator_test/unsafe_coalesce_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import caffe2.python.hypothesis_test_util as hu
 import hypothesis.strategies as st
Index: pytorch/caffe2/python/test/inference_lstm_op_test.py
===================================================================
--- pytorch.orig/caffe2/python/test/inference_lstm_op_test.py
+++ pytorch/caffe2/python/test/inference_lstm_op_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import hypothesis.strategies as st
 import numpy as np
Index: pytorch/docs/caffe2/process.py
===================================================================
--- pytorch.orig/docs/caffe2/process.py
+++ pytorch/docs/caffe2/process.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 ## @package process
 # Module doxygen.process
 # Script to insert preamble for doxygen and regen API docs
Index: pytorch/scripts/build_tizen.sh
===================================================================
--- pytorch.orig/scripts/build_tizen.sh
+++ pytorch/scripts/build_tizen.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 ##############################################################################
 #  Example command to build the Tizen target (RPi3).
 ##############################################################################
Index: pytorch/scripts/release/anaconda-prune/prune.sh
===================================================================
--- pytorch.orig/scripts/release/anaconda-prune/prune.sh
+++ pytorch/scripts/release/anaconda-prune/prune.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 grab_prune_version() {
     conda search -c "${CHANNEL}" --platform "${platform}" "${PKG}" 2>/dev/null | \
Index: pytorch/scripts/release/anaconda-prune/run.sh
===================================================================
--- pytorch.orig/scripts/release/anaconda-prune/run.sh
+++ pytorch/scripts/release/anaconda-prune/run.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 set -euo pipefail
 
Index: pytorch/scripts/release/cut-release-branch.sh
===================================================================
--- pytorch.orig/scripts/release/cut-release-branch.sh
+++ pytorch/scripts/release/cut-release-branch.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 : '
 So you are looking to cut a release branch? Well you came
Index: pytorch/scripts/release/promote/common_utils.sh
===================================================================
--- pytorch.orig/scripts/release/promote/common_utils.sh
+++ pytorch/scripts/release/promote/common_utils.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 exit_if_not_on_git_tag() {
     # Have an override for debugging purposes
Index: pytorch/scripts/release/promote/conda_to_conda.sh
===================================================================
--- pytorch.orig/scripts/release/promote/conda_to_conda.sh
+++ pytorch/scripts/release/promote/conda_to_conda.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 set -eou pipefail
 
Index: pytorch/scripts/release/promote/prep_binary_for_pypi.sh
===================================================================
--- pytorch.orig/scripts/release/promote/prep_binary_for_pypi.sh
+++ pytorch/scripts/release/promote/prep_binary_for_pypi.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 # Preps binaries for publishing to pypi by removing the
 # version suffix we normally add for all binaries
Index: pytorch/scripts/release/promote/s3_to_s3.sh
===================================================================
--- pytorch.orig/scripts/release/promote/s3_to_s3.sh
+++ pytorch/scripts/release/promote/s3_to_s3.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 set -eou pipefail
 
Index: pytorch/scripts/release/promote/wheel_to_pypi.sh
===================================================================
--- pytorch.orig/scripts/release/promote/wheel_to_pypi.sh
+++ pytorch/scripts/release/promote/wheel_to_pypi.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 set -eou pipefail
 
Index: pytorch/scripts/release/restore-backup.sh
===================================================================
--- pytorch.orig/scripts/release/restore-backup.sh
+++ pytorch/scripts/release/restore-backup.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
 
 set -eou pipefail
 
Index: pytorch/test/distributed/argparse_util_test.py
===================================================================
--- pytorch.orig/test/distributed/argparse_util_test.py
+++ pytorch/test/distributed/argparse_util_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: distributed"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/bin/test_script.py
===================================================================
--- pytorch.orig/test/distributed/bin/test_script.py
+++ pytorch/test/distributed/bin/test_script.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: distributed"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/agent/server/test/__init__.py
===================================================================
--- pytorch.orig/test/distributed/elastic/agent/server/test/__init__.py
+++ pytorch/test/distributed/elastic/agent/server/test/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/test/distributed/elastic/agent/server/test/api_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/agent/server/test/api_test.py
+++ pytorch/test/distributed/elastic/agent/server/test/api_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/agent/server/test/local_elastic_agent_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/agent/server/test/local_elastic_agent_test.py
+++ pytorch/test/distributed/elastic/agent/server/test/local_elastic_agent_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/events/lib_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/events/lib_test.py
+++ pytorch/test/distributed/elastic/events/lib_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/metrics/__init__.py
===================================================================
--- pytorch.orig/test/distributed/elastic/metrics/__init__.py
+++ pytorch/test/distributed/elastic/metrics/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/test/distributed/elastic/metrics/api_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/metrics/api_test.py
+++ pytorch/test/distributed/elastic/metrics/api_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/multiprocessing/api_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/multiprocessing/api_test.py
+++ pytorch/test/distributed/elastic/multiprocessing/api_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/multiprocessing/bin/echo1.py
===================================================================
--- pytorch.orig/test/distributed/elastic/multiprocessing/bin/echo1.py
+++ pytorch/test/distributed/elastic/multiprocessing/bin/echo1.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/test/distributed/elastic/multiprocessing/bin/echo2.py
===================================================================
--- pytorch.orig/test/distributed/elastic/multiprocessing/bin/echo2.py
+++ pytorch/test/distributed/elastic/multiprocessing/bin/echo2.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/test/distributed/elastic/multiprocessing/bin/echo3.py
===================================================================
--- pytorch.orig/test/distributed/elastic/multiprocessing/bin/echo3.py
+++ pytorch/test/distributed/elastic/multiprocessing/bin/echo3.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/test/distributed/elastic/multiprocessing/bin/test_script.py
===================================================================
--- pytorch.orig/test/distributed/elastic/multiprocessing/bin/test_script.py
+++ pytorch/test/distributed/elastic/multiprocessing/bin/test_script.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/multiprocessing/bin/zombie_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/multiprocessing/bin/zombie_test.py
+++ pytorch/test/distributed/elastic/multiprocessing/bin/zombie_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/multiprocessing/errors/api_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/multiprocessing/errors/api_test.py
+++ pytorch/test/distributed/elastic/multiprocessing/errors/api_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 import json
Index: pytorch/test/distributed/elastic/multiprocessing/errors/error_handler_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/multiprocessing/errors/error_handler_test.py
+++ pytorch/test/distributed/elastic/multiprocessing/errors/error_handler_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 import filecmp
Index: pytorch/test/distributed/elastic/multiprocessing/redirects_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/multiprocessing/redirects_test.py
+++ pytorch/test/distributed/elastic/multiprocessing/redirects_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/multiprocessing/tail_log_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/multiprocessing/tail_log_test.py
+++ pytorch/test/distributed/elastic/multiprocessing/tail_log_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/timer/local_timer_example.py
===================================================================
--- pytorch.orig/test/distributed/elastic/timer/local_timer_example.py
+++ pytorch/test/distributed/elastic/timer/local_timer_example.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/utils/__init__.py
===================================================================
--- pytorch.orig/test/distributed/elastic/utils/__init__.py
+++ pytorch/test/distributed/elastic/utils/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/test/distributed/elastic/utils/data/__init__.py
===================================================================
--- pytorch.orig/test/distributed/elastic/utils/data/__init__.py
+++ pytorch/test/distributed/elastic/utils/data/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/test/distributed/elastic/utils/data/cycling_iterator_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/utils/data/cycling_iterator_test.py
+++ pytorch/test/distributed/elastic/utils/data/cycling_iterator_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/utils/distributed_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/utils/distributed_test.py
+++ pytorch/test/distributed/elastic/utils/distributed_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/utils/logging_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/utils/logging_test.py
+++ pytorch/test/distributed/elastic/utils/logging_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/elastic/utils/util_test.py
===================================================================
--- pytorch.orig/test/distributed/elastic/utils/util_test.py
+++ pytorch/test/distributed/elastic/utils/util_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/launcher/__init__.py
===================================================================
--- pytorch.orig/test/distributed/launcher/__init__.py
+++ pytorch/test/distributed/launcher/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/test/distributed/launcher/api_test.py
===================================================================
--- pytorch.orig/test/distributed/launcher/api_test.py
+++ pytorch/test/distributed/launcher/api_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/launcher/bin/test_script.py
===================================================================
--- pytorch.orig/test/distributed/launcher/bin/test_script.py
+++ pytorch/test/distributed/launcher/bin/test_script.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/launcher/bin/test_script_init_method.py
===================================================================
--- pytorch.orig/test/distributed/launcher/bin/test_script_init_method.py
+++ pytorch/test/distributed/launcher/bin/test_script_init_method.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/launcher/bin/test_script_is_torchelastic_launched.py
===================================================================
--- pytorch.orig/test/distributed/launcher/bin/test_script_is_torchelastic_launched.py
+++ pytorch/test/distributed/launcher/bin/test_script_is_torchelastic_launched.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/launcher/bin/test_script_local_rank.py
===================================================================
--- pytorch.orig/test/distributed/launcher/bin/test_script_local_rank.py
+++ pytorch/test/distributed/launcher/bin/test_script_local_rank.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/launcher/launch_test.py
===================================================================
--- pytorch.orig/test/distributed/launcher/launch_test.py
+++ pytorch/test/distributed/launcher/launch_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/launcher/run_test.py
===================================================================
--- pytorch.orig/test/distributed/launcher/run_test.py
+++ pytorch/test/distributed/launcher/run_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: r2p"]
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/test/distributed/nn/jit/test_instantiator.py
===================================================================
--- pytorch.orig/test/distributed/nn/jit/test_instantiator.py
+++ pytorch/test/distributed/nn/jit/test_instantiator.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: distributed"]
 
 import pathlib
Index: pytorch/test/distributed/rpc/cuda/test_tensorpipe_agent.py
===================================================================
--- pytorch.orig/test/distributed/rpc/cuda/test_tensorpipe_agent.py
+++ pytorch/test/distributed/rpc/cuda/test_tensorpipe_agent.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: distributed"]
 
 import sys
Index: pytorch/test/distributed/rpc/test_faulty_agent.py
===================================================================
--- pytorch.orig/test/distributed/rpc/test_faulty_agent.py
+++ pytorch/test/distributed/rpc/test_faulty_agent.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: distributed"]
 
 import sys
Index: pytorch/test/distributed/rpc/test_share_memory.py
===================================================================
--- pytorch.orig/test/distributed/rpc/test_share_memory.py
+++ pytorch/test/distributed/rpc/test_share_memory.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: distributed"]
 
 import torch
Index: pytorch/test/distributed/rpc/test_tensorpipe_agent.py
===================================================================
--- pytorch.orig/test/distributed/rpc/test_tensorpipe_agent.py
+++ pytorch/test/distributed/rpc/test_tensorpipe_agent.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: distributed"]
 
 import sys
Index: pytorch/test/run_test.py
===================================================================
--- pytorch.orig/test/run_test.py
+++ pytorch/test/run_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import argparse
 import copy
Index: pytorch/test/scripts/run_cuda_memcheck.py
===================================================================
--- pytorch.orig/test/scripts/run_cuda_memcheck.py
+++ pytorch/test/scripts/run_cuda_memcheck.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 """This script runs cuda-memcheck on the specified unit test. Each test case
 is run in its isolated process with a timeout so that:
Index: pytorch/test/test_bundled_images.py
===================================================================
--- pytorch.orig/test/test_bundled_images.py
+++ pytorch/test/test_bundled_images.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: mobile"]
 
 import torch
Index: pytorch/test/test_bundled_inputs.py
===================================================================
--- pytorch.orig/test/test_bundled_inputs.py
+++ pytorch/test/test_bundled_inputs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: mobile"]
 
 import io
Index: pytorch/test/test_model_dump.py
===================================================================
--- pytorch.orig/test/test_model_dump.py
+++ pytorch/test/test_model_dump.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: mobile"]
 
 import sys
Index: pytorch/test/test_nnapi.py
===================================================================
--- pytorch.orig/test/test_nnapi.py
+++ pytorch/test/test_nnapi.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Owner(s): ["oncall: mobile"]
 
 import os
Index: pytorch/test/test_testing.py
===================================================================
--- pytorch.orig/test/test_testing.py
+++ pytorch/test/test_testing.py
@@ -320,7 +320,7 @@ class TestTesting(TestCase):
     def test_cuda_assert_should_stop_common_utils_test_suite(self, device):
         # test to ensure common_utils.py override has early termination for CUDA.
         stderr = TestCase.runWithPytorchAPIUsageStderr("""\
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import torch
 from torch.testing._internal.common_utils import (TestCase, run_tests, slowTest)
@@ -354,7 +354,7 @@ if __name__ == '__main__':
     def test_cuda_assert_should_stop_common_device_type_test_suite(self, device):
         # test to ensure common_device_type.py override has early termination for CUDA.
         stderr = TestCase.runWithPytorchAPIUsageStderr("""\
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import torch
 from torch.testing._internal.common_utils import (TestCase, run_tests, slowTest)
@@ -395,7 +395,7 @@ if __name__ == '__main__':
     def test_cuda_assert_should_not_stop_common_distributed_test_suite(self, device):
         # test to ensure common_distributed.py override should not early terminate CUDA.
         stderr = TestCase.runWithPytorchAPIUsageStderr("""\
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import torch
 from torch.testing._internal.common_utils import (run_tests, slowTest)
@@ -458,7 +458,7 @@ class TestFrameworkUtils(TestCase):
     def test_filtering_env_var(self):
         # Test environment variable selected device type test generator.
         test_filter_file_template = """\
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import torch
 from torch.testing._internal.common_utils import (TestCase, run_tests)
Index: pytorch/third_party/build_bundled.py
===================================================================
--- pytorch.orig/third_party/build_bundled.py
+++ pytorch/third_party/build_bundled.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 import argparse
 import os
 
Index: pytorch/third_party/generate-cpuinfo-wrappers.py
===================================================================
--- pytorch.orig/third_party/generate-cpuinfo-wrappers.py
+++ pytorch/third_party/generate-cpuinfo-wrappers.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 from __future__ import print_function
 import os
Index: pytorch/third_party/generate-xnnpack-wrappers.py
===================================================================
--- pytorch.orig/third_party/generate-xnnpack-wrappers.py
+++ pytorch/third_party/generate-xnnpack-wrappers.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 from __future__ import print_function
 import collections
Index: pytorch/tools/amd_build/build_amd.py
===================================================================
--- pytorch.orig/tools/amd_build/build_amd.py
+++ pytorch/tools/amd_build/build_amd.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 
 import argparse
Index: pytorch/tools/code_analyzer/gen_operators_yaml.py
===================================================================
--- pytorch.orig/tools/code_analyzer/gen_operators_yaml.py
+++ pytorch/tools/code_analyzer/gen_operators_yaml.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 import argparse
 import json
 import sys
Index: pytorch/tools/code_analyzer/gen_oplist.py
===================================================================
--- pytorch.orig/tools/code_analyzer/gen_oplist.py
+++ pytorch/tools/code_analyzer/gen_oplist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 import argparse
 import json
 import os
Index: pytorch/tools/code_coverage/oss_coverage.py
===================================================================
--- pytorch.orig/tools/code_coverage/oss_coverage.py
+++ pytorch/tools/code_coverage/oss_coverage.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 import time
 
 from package.oss.cov_json import get_json_report
Index: pytorch/tools/extract_scripts.py
===================================================================
--- pytorch.orig/tools/extract_scripts.py
+++ pytorch/tools/extract_scripts.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import argparse
 import re
@@ -36,8 +36,8 @@ def extract(step: Step) -> Optional[Scri
 
     if run is not None and extension is not None:
         script = {
-            "bash": f"#!/usr/bin/env bash\nset -eo pipefail\n{run}",
-            "sh": f"#!/usr/bin/env sh\nset -e\n{run}",
+            "bash": f"#!/usr/bin/bash\nset -eo pipefail\n{run}",
+            "sh": f"#!/usr/bin/sh\nset -e\n{run}",
         }.get(shell, run)
         return {"extension": extension, "script": script}
     elif is_gh_script and gh_script is not None:
Index: pytorch/tools/fast_nvcc/fast_nvcc.py
===================================================================
--- pytorch.orig/tools/fast_nvcc/fast_nvcc.py
+++ pytorch/tools/fast_nvcc/fast_nvcc.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import argparse
 import asyncio
Index: pytorch/tools/linter/adapters/nativefunctions_linter.py
===================================================================
--- pytorch.orig/tools/linter/adapters/nativefunctions_linter.py
+++ pytorch/tools/linter/adapters/nativefunctions_linter.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 """
 Verify that it is possible to round-trip native_functions.yaml via ruamel under some
 configuration.  Keeping native_functions.yaml consistent in this way allows us to
Index: pytorch/tools/linter/adapters/testowners_linter.py
===================================================================
--- pytorch.orig/tools/linter/adapters/testowners_linter.py
+++ pytorch/tools/linter/adapters/testowners_linter.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 """
 Test ownership was introduced in https://github.com/pytorch/pytorch/issues/66232.
 
Index: pytorch/tools/lite_interpreter/gen_selected_mobile_ops_header.py
===================================================================
--- pytorch.orig/tools/lite_interpreter/gen_selected_mobile_ops_header.py
+++ pytorch/tools/lite_interpreter/gen_selected_mobile_ops_header.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 import argparse
 import os
 from typing import Set
Index: pytorch/tools/nightly.py
===================================================================
--- pytorch.orig/tools/nightly.py
+++ pytorch/tools/nightly.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # Much of the logging code here was forked from https://github.com/ezyang/ghstack
 # Copyright (c) Edward Z. Yang <ezyang@mit.edu>
 """Checks out the nightly development version of PyTorch and installs pre-built
Index: pytorch/tools/onnx/update_default_opset_version.py
===================================================================
--- pytorch.orig/tools/onnx/update_default_opset_version.py
+++ pytorch/tools/onnx/update_default_opset_version.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 """Updates the default value of opset_version.
 
Index: pytorch/tools/render_junit.py
===================================================================
--- pytorch.orig/tools/render_junit.py
+++ pytorch/tools/render_junit.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import argparse
 import os
Index: pytorch/tools/stats/import_test_stats.py
===================================================================
--- pytorch.orig/tools/stats/import_test_stats.py
+++ pytorch/tools/stats/import_test_stats.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import datetime
 import json
Index: pytorch/tools/stats/print_test_stats.py
===================================================================
--- pytorch.orig/tools/stats/print_test_stats.py
+++ pytorch/tools/stats/print_test_stats.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 import bz2
Index: pytorch/tools/stats/test_history.py
===================================================================
--- pytorch.orig/tools/stats/test_history.py
+++ pytorch/tools/stats/test_history.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import argparse
 import subprocess
Index: pytorch/tools/testing/explicit_ci_jobs.py
===================================================================
--- pytorch.orig/tools/testing/explicit_ci_jobs.py
+++ pytorch/tools/testing/explicit_ci_jobs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import argparse
 import fnmatch
Index: pytorch/tools/vscode_settings.py
===================================================================
--- pytorch.orig/tools/vscode_settings.py
+++ pytorch/tools/vscode_settings.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import json
 from pathlib import Path
Index: pytorch/torch/_appdirs.py
===================================================================
--- pytorch.orig/torch/_appdirs.py
+++ pytorch/torch/_appdirs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 # Copyright (c) 2005-2010 ActiveState Software Inc.
 # Copyright (c) 2013 Eddy Petrișor
Index: pytorch/torch/csrc/jit/tensorexpr/codegen_external.py
===================================================================
--- pytorch.orig/torch/csrc/jit/tensorexpr/codegen_external.py
+++ pytorch/torch/csrc/jit/tensorexpr/codegen_external.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 import argparse
 from torchgen.gen import parse_native_yaml, FileManager
 import torchgen.model as model
Index: pytorch/torch/distributed/argparse_util.py
===================================================================
--- pytorch.orig/torch/distributed/argparse_util.py
+++ pytorch/torch/distributed/argparse_util.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/agent/server/__init__.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/agent/server/__init__.py
+++ pytorch/torch/distributed/elastic/agent/server/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/agent/server/api.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/agent/server/api.py
+++ pytorch/torch/distributed/elastic/agent/server/api.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/agent/server/local_elastic_agent.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/agent/server/local_elastic_agent.py
+++ pytorch/torch/distributed/elastic/agent/server/local_elastic_agent.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/events/api.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/events/api.py
+++ pytorch/torch/distributed/elastic/events/api.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/events/handlers.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/events/handlers.py
+++ pytorch/torch/distributed/elastic/events/handlers.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/metrics/api.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/metrics/api.py
+++ pytorch/torch/distributed/elastic/metrics/api.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/multiprocessing/__init__.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/multiprocessing/__init__.py
+++ pytorch/torch/distributed/elastic/multiprocessing/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/multiprocessing/api.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/multiprocessing/api.py
+++ pytorch/torch/distributed/elastic/multiprocessing/api.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/multiprocessing/errors/__init__.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/multiprocessing/errors/__init__.py
+++ pytorch/torch/distributed/elastic/multiprocessing/errors/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/multiprocessing/errors/error_handler.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/multiprocessing/errors/error_handler.py
+++ pytorch/torch/distributed/elastic/multiprocessing/errors/error_handler.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/multiprocessing/errors/handlers.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/multiprocessing/errors/handlers.py
+++ pytorch/torch/distributed/elastic/multiprocessing/errors/handlers.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/multiprocessing/tail_log.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/multiprocessing/tail_log.py
+++ pytorch/torch/distributed/elastic/multiprocessing/tail_log.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/rendezvous/etcd_rendezvous.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/rendezvous/etcd_rendezvous.py
+++ pytorch/torch/distributed/elastic/rendezvous/etcd_rendezvous.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/torch/distributed/elastic/rendezvous/etcd_server.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/rendezvous/etcd_server.py
+++ pytorch/torch/distributed/elastic/rendezvous/etcd_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/rendezvous/static_tcp_rendezvous.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/rendezvous/static_tcp_rendezvous.py
+++ pytorch/torch/distributed/elastic/rendezvous/static_tcp_rendezvous.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 # Copyright (c) Facebook, Inc. and its affiliates.
Index: pytorch/torch/distributed/elastic/utils/__init__.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/utils/__init__.py
+++ pytorch/torch/distributed/elastic/utils/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/utils/api.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/utils/api.py
+++ pytorch/torch/distributed/elastic/utils/api.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/utils/data/__init__.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/utils/data/__init__.py
+++ pytorch/torch/distributed/elastic/utils/data/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/utils/data/cycling_iterator.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/utils/data/cycling_iterator.py
+++ pytorch/torch/distributed/elastic/utils/data/cycling_iterator.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/utils/data/elastic_distributed_sampler.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/utils/data/elastic_distributed_sampler.py
+++ pytorch/torch/distributed/elastic/utils/data/elastic_distributed_sampler.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/utils/distributed.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/utils/distributed.py
+++ pytorch/torch/distributed/elastic/utils/distributed.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/utils/log_level.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/utils/log_level.py
+++ pytorch/torch/distributed/elastic/utils/log_level.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/utils/logging.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/utils/logging.py
+++ pytorch/torch/distributed/elastic/utils/logging.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/elastic/utils/store.py
===================================================================
--- pytorch.orig/torch/distributed/elastic/utils/store.py
+++ pytorch/torch/distributed/elastic/utils/store.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/launcher/api.py
===================================================================
--- pytorch.orig/torch/distributed/launcher/api.py
+++ pytorch/torch/distributed/launcher/api.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/distributed/rpc/_testing/faulty_agent_backend_registry.py
===================================================================
--- pytorch.orig/torch/distributed/rpc/_testing/faulty_agent_backend_registry.py
+++ pytorch/torch/distributed/rpc/_testing/faulty_agent_backend_registry.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import torch.distributed as dist
 import torch.distributed.rpc as rpc
Index: pytorch/torch/distributed/run.py
===================================================================
--- pytorch.orig/torch/distributed/run.py
+++ pytorch/torch/distributed/run.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 # Copyright (c) Facebook, Inc. and its affiliates.
 # All rights reserved.
Index: pytorch/torch/testing/_internal/distributed/ddp_under_dist_autograd_test.py
===================================================================
--- pytorch.orig/torch/testing/_internal/distributed/ddp_under_dist_autograd_test.py
+++ pytorch/torch/testing/_internal/distributed/ddp_under_dist_autograd_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 
 import contextlib
 import enum
Index: pytorch/torch/testing/_internal/distributed/rpc_utils.py
===================================================================
--- pytorch.orig/torch/testing/_internal/distributed/rpc_utils.py
+++ pytorch/torch/testing/_internal/distributed/rpc_utils.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 import os
 import sys
 import unittest
Index: pytorch/torch/utils/bundled_inputs.py
===================================================================
--- pytorch.orig/torch/utils/bundled_inputs.py
+++ pytorch/torch/utils/bundled_inputs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 from typing import Any, TypeVar, Optional, Tuple, List, NamedTuple, Union, Sequence, Dict, Callable
 import textwrap
 import torch
Index: pytorch/torch/utils/data/dataloader.py
===================================================================
--- pytorch.orig/torch/utils/data/dataloader.py
+++ pytorch/torch/utils/data/dataloader.py
@@ -1181,7 +1181,7 @@ class _MultiProcessingDataLoaderIter(_Ba
 # this is rare and seems to be nondeterministic.
 #
 #
-#   #!/usr/bin/env python3
+#   #!/usr/bin/python3
 #   import sys
 #   import socket
 #   import os
Index: pytorch/torch/utils/hipify/hipify_python.py
===================================================================
--- pytorch.orig/torch/utils/hipify/hipify_python.py
+++ pytorch/torch/utils/hipify/hipify_python.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 """ The Python Hipify script.
 ##
 # Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved.
Index: pytorch/torch/utils/model_dump/__init__.py
===================================================================
--- pytorch.orig/torch/utils/model_dump/__init__.py
+++ pytorch/torch/utils/model_dump/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 """
 model_dump: a one-stop shop for TorchScript model inspection.
 
Index: pytorch/torch/utils/model_dump/__main__.py
===================================================================
--- pytorch.orig/torch/utils/model_dump/__main__.py
+++ pytorch/torch/utils/model_dump/__main__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 import sys
 from . import main
 
Index: pytorch/torch/utils/show_pickle.py
===================================================================
--- pytorch.orig/torch/utils/show_pickle.py
+++ pytorch/torch/utils/show_pickle.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 import sys
 import pickle
 import struct
Index: pytorch/torchgen/decompositions/gen_jit_decompositions.py
===================================================================
--- pytorch.orig/torchgen/decompositions/gen_jit_decompositions.py
+++ pytorch/torchgen/decompositions/gen_jit_decompositions.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 import os
 from pathlib import Path
 
Index: pytorch/torchgen/operator_versions/gen_mobile_upgraders.py
===================================================================
--- pytorch.orig/torchgen/operator_versions/gen_mobile_upgraders.py
+++ pytorch/torchgen/operator_versions/gen_mobile_upgraders.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 import os
 from enum import Enum
 from pathlib import Path
Index: pytorch/torchgen/shape_functions/gen_jit_shape_functions.py
===================================================================
--- pytorch.orig/torchgen/shape_functions/gen_jit_shape_functions.py
+++ pytorch/torchgen/shape_functions/gen_jit_shape_functions.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 import importlib.util
 import os
 import sys
