how to upgrade python 2.7 to 3 in linux code example Example: upgrade python to 3.9 i linux $ sudo apt install python3.9