upgrade python 3.5 to 3.8 ubuntu 16.04 code example
Example 1: install python3.7 ubuntu 20.04
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.7
Example 2: 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