filmov
tv
How to Install Python3.9 on Ubuntu 22 and set default Python version #linux #python #ubuntu

Показать описание
1) Check your python version with the command:
python3 -V
2) Download the python repository for ubuntu:
sudo add-apt-repository ppa:deadsnakes/ppa
3) Install Python 3.9:
sudo apt install python3.9
4) Enter the following command, but replace “/usr/bin/python3.8” with your current version if different. (for example use “/usr/bin/python3.10” if you got 3.10 from step 1).
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
Set python3.9 as option 2:
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2
#linux #ubuntu #python #pythontutorial #pythonlinux
python3 -V
2) Download the python repository for ubuntu:
sudo add-apt-repository ppa:deadsnakes/ppa
3) Install Python 3.9:
sudo apt install python3.9
4) Enter the following command, but replace “/usr/bin/python3.8” with your current version if different. (for example use “/usr/bin/python3.10” if you got 3.10 from step 1).
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
Set python3.9 as option 2:
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2
#linux #ubuntu #python #pythontutorial #pythonlinux