서버 : Vultr 클라우드
OS: Ubuntu 22.04 LTS
사용자 계정 생성하여 설치 진행함
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 python3.8
4. Install Python 3.8 on Ubuntu 22.04
sudo apt install python3.8
5. Install Python 3.9 on Ubuntu 22.04
sudo apt install python3.9
6. Set the default Python version
ls /usr/bin/python*
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 2
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 3
Switch the default Python version
sudo update-alternatives --config python
python -V
참고:
Install Python 3.9 or 3.8 on Ubuntu 22.04 LTS Jammy JellyFish (how2shout.com)