Python in AL2 - Amazon Linux 2
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Python in AL2

AL2 provides support and security patches for Python 2.7 until June 2025, as part of our long-term support commitment for AL2 core packages. This support extends beyond the upstream Python community declaration of Python 2.7 EOL of January 2020.

Note

AL2023 completely removed Python 2.7. Any components requiring Python are now written to work with Python 3.

AL2 uses the yum package manager that has a hard dependency on Python 2.7. In AL2023, the dnf package manager has migrated to Python 3, and no longer requires Python 2.7. AL2023 has completely moved to Python 3. We recommend that you complete your migration to Python 3.