- update the software manager
sudo apt update && sudo apt upgrade
2. Install the prerequisite for adding custom PPAs.
sudo apt install software-properties-common -y
3. add the deadsnakes/ppa to your APT package source list
sudo add-apt-repository ppa:deadsnakes/ppa -y
4. update the APT
sudo apt update
5. install python3.10
sudo apt install python3.10 -y
6. check the version
python3.10 --version