
Ubunto python 3.10 upgrade to python3.12
- 파이썬의 업그레이드와 이전 버전의 파이썬 삭제하여 정리하는 방법을 정리 합니다.
Step 1: Update CA Certificates
sudo apt update
sudo apt install --reinstall ca-certificates -y
sudo update-ca-certificates
Step 2 : PPA (Personal Package Archive) Repository
$ sudo apt update && sudo apt upgrade -y
$ sudo apt install software-properties-common -y
$ sudo add-apt-repository ppa:deadsnakes/ppa
Step 3: Use Manual Source Instead of
# use apt-repository install with apt
sudo apt update
sudo apt install python3.12 -y
or
# Step 3: Use Manual Source Instead of add-apt-repository
# 1.Create a new .list file:
echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/deadsnakes-ppa.list
# 2. Import the GPG key:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6A755776
# installation with source
wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz
tar -xvf Python-3.12.0.tgz
cd Python-3.12.0
./configure
make
sudo make install
Step 4: apt install python3.12 -y
sudo apt update sudo apt install python3.12 -y
python3.12 --version
* manual .list + GPG key method step by step (avoiding add-apt-repository
Step 5: Optional: Set Python 3.12 as default
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 2
sudo update-alternatives --config python3
* /usr/bin/python3.12
/usr/bin/python3 -> /etc/alternatives/python3
/etc/alternatives/python3 -> /usr/bin/python3.12*
Step 6: Clean old packages
sudo apt autoremove -y
* Since apt told you some packages are no longer required : for free space.
참고
[DevOps] - Python + Django + Oracle
[Programming] - (Pycharm 설치) Pycharm 과 Conda & Anaconda 설치
[InfraPlatform] - 리눅스 설치시 해야 할일 10가지
[Programming] - 파이참(Pycharm) 설치와 pip 사용하기
[Programming] - [python] python virtualenv (가상환경) 사용하기
[Programming] - (Pycharm 설치) PIP 패키지 설치 인증서 오류 해결- SSL: CERTIFICATE_VERIFY_FAILED