Programming/python(파이썬)

python 원하는 버전 설치 및 연결하기

구차니 2025. 8. 26. 11:51

ppa 추가해서 원하는 버전 설치하고, update-alternatives로 연결하면 된다.

 

sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.7

[링크 : https://askubuntu.com/questions/1251318/how-do-you-install-python3-7-to-ubuntu-20-04]

 

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1

[링크 : https://sosodev.tistory.com/entry/Python-pyenv-특정-버전을-설치하기-Ubuntu]