Updated April 2026 – Works with Python 3.12+ and all major Linux distributions.
python --version
altinstall prevents overwriting the python3 binary. The new version will be available as python3.12 . how to update python on linux
python3.12 -m venv my_project_env source my_project_env/bin/activate Updated April 2026 – Works with Python 3