upgrade to python 3 code example
Example 1: how to install python3 in ubuntu
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.8
Example 2: upgrade python to 3.8
$ sudo apt update -y
$ sudo apt install python3.8
Example 3: pip install python 3
You cannot just pip install python3 because it is not a library.
If you want to install the latest python3:
https://www.python.org/ftp/python/3.8.2/python-3.8.2.exe