Current Python version
$ python --version
or
$ python -V
[ Execution Log ]
[gangserver@localhost ~]$ python --version
Python 3.9.23
Install Python 3.12
$ sudo dnf install python3.12
or
$ sudo yum install python3.12
[ Execution Log ]
[gangserver@localhost ~]$ sudo dnf install python3.12
마지막 메타자료 만료확인(1:01:20 이전): 2025년 09월 22일 (월) 오전 06시 39분 11초.
종속성이 해결되었습니다.
================================================================================
꾸러미 구조 버전 저장소 크기
================================================================================
설치 중:
python3.12 x86_64 3.12.11-2.el9 appstream 27 k
종속 꾸러미 설치 중:
libnsl2 x86_64 2.0.0-1.el9 appstream 31 k
mpdecimal x86_64 2.5.1-3.el9 appstream 86 k
python3.12-libs x86_64 3.12.11-2.el9 appstream 9.7 M
python3.12-pip-wheel noarch 23.2.1-5.el9 appstream 1.5 M
연결 요약
================================================================================
설치 5 꾸러미
전체 내려받기 크기: 11 M
설치된 크기 : 44 M
진행할까요? [y/N]: y
꾸러미 내려받기 중:
(1/5): python3.12-3.12.11-2.el9.x86_64.rpm 26 kB/s | 27 kB 00:01
(2/5): libnsl2-2.0.0-1.el9.x86_64.rpm 28 kB/s | 31 kB 00:01
(3/5): mpdecimal-2.5.1-3.el9.x86_64.rpm 59 kB/s | 86 kB 00:01
(4/5): python3.12-pip-wheel-23.2.1-5.el9.noarch 433 kB/s | 1.5 MB 00:03
(5/5): python3.12-libs-3.12.11-2.el9.x86_64.rpm 603 kB/s | 9.7 MB 00:16
--------------------------------------------------------------------------------
합계 643 kB/s | 11 MB 00:18
연결 확인 실행 중
연결 확인에 성공했습니다.
연결 시험 실행 중
연결 시험에 성공했습니다.
연결 실행 중
준비 중 : 1/1
설치 중 : python3.12-pip-wheel-23.2.1-5.el9.noarch 1/5
설치 중 : mpdecimal-2.5.1-3.el9.x86_64 2/5
설치 중 : libnsl2-2.0.0-1.el9.x86_64 3/5
설치 중 : python3.12-3.12.11-2.el9.x86_64 4/5
설치 중 : python3.12-libs-3.12.11-2.el9.x86_64 5/5
구현 중 : python3.12-libs-3.12.11-2.el9.x86_64 5/5
확인 중 : libnsl2-2.0.0-1.el9.x86_64 1/5
확인 중 : mpdecimal-2.5.1-3.el9.x86_64 2/5
확인 중 : python3.12-3.12.11-2.el9.x86_64 3/5
확인 중 : python3.12-libs-3.12.11-2.el9.x86_64 4/5
확인 중 : python3.12-pip-wheel-23.2.1-5.el9.noarch 5/5
설치되었습니다:
libnsl2-2.0.0-1.el9.x86_64 mpdecimal-2.5.1-3.el9.x86_64
python3.12-3.12.11-2.el9.x86_64 python3.12-libs-3.12.11-2.el9.x86_64
python3.12-pip-wheel-23.2.1-5.el9.noarch
완료되었습니다!
Move to /usr/bin directory and check Python executable file
$ cd /usr/bin
$ ls -al python*
[ Execution Log ]
[gangserver@localhost ~]$ cd /usr/bin
[gangserver@localhost bin]$ ls -al python*
lrwxrwxrwx. 1 root root 9 8월 20 19:15 python -> ./python3
lrwxrwxrwx. 1 root root 9 9월 22 07:39 python3 -> python3.9
-rwxr-xr-x. 1 root root 15448 8월 22 01:19 python3.12
-rwxr-xr-x. 1 root root 15440 8월 20 19:15 python3.9
python is linked to python3 and python3 is linked to python3.9 via symbolic links.
Change python3 symbolic link from python3.9 to python3.12
$ sudo ln -Tfs python3.12 python3
$ ls -al python*
[ Execution Log ]
[gangserver@localhost bin]$ sudo ln -Tfs python3.12 python3
[sudo] gangserver의 암호:
[gangserver@localhost bin]$ ls -al python*
lrwxrwxrwx. 1 root root 9 8월 20 19:15 python -> ./python3
lrwxrwxrwx. 1 root root 10 9월 22 07:42 python3 -> python3.12
-rwxr-xr-x. 1 root root 15448 8월 22 01:19 python3.12
-rwxr-xr-x. 1 root root 15440 8월 20 19:15 python3.9
Check Python version and Run Python
$ cd
$ python --version
$ python
[ Execution Log ]
[gangserver@localhost bin]$ cd
[gangserver@localhost ~]$ python --version
Python 3.12.11
[gangserver@localhost ~]$ python
Python 3.12.11 (main, Aug 14 2025, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-11)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
[gangserver@localhost ~]$
'OS > CentOS' 카테고리의 다른 글
CentOS Stream 9 GParted, GPart install (0) | 2025.09.22 |
---|---|
CentOS Stream 9 : libgtk-x11-2.0.so.0 error when running Double Commander (0) | 2025.09.22 |
CentOS Stream 9 python 3.13 install (0) | 2025.09.22 |
CentOS Stream 9 htop install (0) | 2025.09.22 |
CentOS Stream 9 balenaEtcher install (0) | 2025.09.22 |