I am currently on ubuntu 18.04.
My default python version is Python 3.7.9
I wanted to upgrade it to Python 3.9.2 and set it as default python version
How do I do that ?
Install Python normally with the deadsnake PPA:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.9
Check if you can access Python:
python3.9 --version
If so, create a symlink to set it as "default":
sudo mv /usr/bin/python /usr/bin/python3.7
sudo ln -s $(which python3.9) /usr/bin/python
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With