upgrade from Python 2.7.12 to 3.9 ubuntu code example Example: update python ubuntu $ sudo apt update -y $ sudo apt install python3.7