# Install Python on Ubuntu 22.04 ###### tags: `Ubuntu` `Ubuntu 22.04` `Python` [Reference Link](https://www.how2shout.com/linux/install-python-3-9-or-3-8-on-ubuntu-22-04-lts-jammy-jellyfish/) 1. Start with the system update ``` $ sudo apt update && sudo apt upgrade ``` 2. Add PPA for Python old versions ``` $ sudo apt install software-properties-common $ sudo add-apt-repository ppa:deadsnakes/ppa ``` 3. Check Python Versions you want ``` $ sudo apt-cache policy python(version) ``` Example: ``` $ sudo apt-cache policy python3.10 ``` 4. Install Python 3.10 on Ubuntu 22.04 ``` $ sudo apt install python3.10 ``` 5. Set the default Python version ``` $ ls /usr/bin/python* $ sudo update-alternatives --list python $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 ``` 6. Check version ``` $ python -V Python 3.10.4 ``` 7. Uninstall Python and PPA ``` $ sudo apt remove --purge python3.9 ``` ``` $ sudo add-apt-repository --remove ppa:deadsnakes/ppa ```