Install python 3.10 on Ubuntu 20.04
Given the age of Ubuntu 20.04 vs Ubuntu 22.04, installing python3.10 in Ubuntu 20.04 requires reading from a PPA.
Commands below will require
sudo - but I'm not including it so that you don't copy and paste
Note: you want to be careful when adding a PPA of developers you don't know. So why should you trust deadsnakes? Well, use at your own risk, but it's been run by Anthony Sottile and Felix Krull for years and is the most widely recommended way to install new versions of python.