Lesson 3 +10 XP

Python Versions and Environments

Python Versions and Environments

Python keeps improving. New versions appear about once a year, and each one adds features.

Major versions

  • Python 2 is retired. It stopped being maintained on January 1, 2020.
  • Python 3 is the present and the future. Always use Python 3.

Recent 3.x versions

Python 3.13, 3.14, 3.15, and the in-development 3.16 keep the language moving forward. Each release adds new syntax, speed, and library features.

What is "Python 3.16"?

At any moment there are a few versions in different states:

  • Stable: ready for everyday use, like 3.13 or 3.14.
  • Pre-release / beta: nearly done, good for testing new features.
  • In development: alpha versions where new ideas land first.

The official docs at docs.python.org always have a version for each stage, such as the Python 3.16 documentation.

Virtual environments

Different projects may need different package versions. A virtual environment gives each project its own little world so they don't fight each other.

python -m venv myenv

You'll learn more about these in the PIP lesson.

TL;DR

  • Use Python 3; Python 2 is retired.
  • New versions ship roughly every year (3.13, 3.14, 3.15, 3.16...).
  • 3.16 is the in-development version with its own docs.
  • Virtual environments keep project packages separate.