How to Install Python 3.10 Alpha 2 in Ubuntu 20.04, 18.04, 16.04

The popular programming language Python 3.10 released the second alpha a few days ago for testing purpose. Here’s how to install it in all current Ubuntu LTS.

What’s New in Python 3.10:

Note that during the alpha phase, features may be added up until the start of the beta phase (2021-05-03) and, if necessary, may be modified or deleted up until the release candidate phase (2021-10-04).

So far in alpha 2, it features:

  • Remove wstr from Unicode
  • Allow writing union types as X | Y
  • Parameter Specification Variables
  • Precise line numbers for debugging and other tools.
  • from __future__ import annotations is now the default.

Install Python 3.10 in Ubuntu via PPA:

Note that this is a preview release and its use is NOT recommended for production environments.

The well trusted “deadsnakes” team PPA has built the packages for Ubuntu 16.04, Ubuntu 18.04, Ubuntu 20.04, Linux Mint 19 and 20.

  1. Open terminal from system app launcher. When it opens, run command to add the PPA:
    sudo add-apt-repository ppa:deadsnakes/ppa

  2. Then refresh system package cache via command:
    sudo apt update
  3. Finally install Python 3.10:
    sudo apt install python3.10

Once installed, you can run the command line IDE or use python --version command to check out the package version.

Uninstall Python 3.10:

You can keep the deadsnakes PPA as it’s being updated regularly. If you insist, remove it either with your system package manager (Software & Updates), or by running command:

sudo add-apt-repository --remove ppa:deadsnakes/ppa

To remove Python 3.10 from Ubuntu, simply run command:

sudo apt remove --autoremove python3.10

Merilyn Ne
Hi, I'm Merilyn Ne, a geek who has been working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.