DEV Community
•
2026-07-27 07:17
"/usr/bin/env: 'python2': No such file or directory — Amazon Linux 2023 has no Python 2"
You moved an instance, AMI, or launch template from Amazon Linux 2 to Amazon Linux 2023, and something that used to run cleanly now fails on first boot:
/usr/bin/env: 'python2': No such file or directory
Or, if the script called the interpreter directly:
-bash: /usr/bin/python2: No such file or directory
dnf works, the instance is healthy, but any script with a #!/usr/bin/python2...