how to upgrade python to 3.9 code example
Example 1: upgrade python to 3.8
$ sudo apt update -y
$ sudo apt install python3.8
Example 2: upgrade python to 3.9 i linux
$ sudo apt install python3.9
Example 3: how to upgrade python from 2.7 to 2.9 on ubuntu 14.04
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv