sudo apt update
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
Press ENTER
to confirm adding repository.
sudo apt install python3.10 python3.10-venv python3.10-dev
python3 --version
You will see previous of Python. At the writing time Python 3.8.10
Caution
This may cause problem with terminal not open on Ubuntu
https://askubuntu.com/questions/1397938/terminal-not-opening-after-changing-python-version
ls -la /usr/bin/python3
sudo rm /usr/bin/python3
sudo ln -s python3.10 /usr/bin/python3
python3 --version
Now you will see Python 3.10.x
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
python3.10 -m pip --version
python3.10 -m pip install ipython
python3.10 -m venv venv
pip install ipython
https://computingforgeeks.com/how-to-install-python-on-ubuntu-linux-system/
I followed the procedure, and it works on the ARM Linux platform. Here’s an extra tip: if your system's default Python version is 3.9 instead of 3.8, you may encounter errors because the procedure strictly requires Python 3.8. In that case, switch the default Python to version 3.8 or manually edit
/usr/bin/add-apt-repository
to#!/usr/bin/python3.8
as a work around.