1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update sudo apt-get install python3.9
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2
sudo update-alternatives --config python3 There are 2 choices for the alternative python3 (providing /usr/bin/python3).
Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/bin/python3.8 2 auto mode 1 /usr/bin/python3.8 2 manual mode 2 /usr/bin/python3.9 1 manual mode
Press <enter> to keep the current choice[*], or type selection number: 2
sudo apt install python3-pip python3.9-venv
python3 -m venv /home/ubuntu/python/venv
|