OS/CentOS

CentOS Stream 9 python 3.13 install

강서버 2025. 9. 22. 07:36
반응형

Current Python version

$ python --version

or

$ python -V

 

[ Execution Log ]

[gangserver@localhost ~]$ python --version
Python 3.9.23

 

 

Install Python 3.13

$ sudo dnf install python3.13

or

$ sudo yum install python3.13

 

[ Execution Log ]

[gangserver@localhost ~]$ sudo dnf install python3.13
마지막 메타자료 만료확인(0:53:04 이전): 2025년 09월 22일 (월) 오전 06시 39분 11초.
종속성이 해결되었습니다.
================================================================================
 꾸러미                    구조        버전                저장소          크기
================================================================================
설치 중:
 python3.13                x86_64      3.13.7-1.el9        epel            30 k
종속 꾸러미 설치 중:
 mpdecimal                 x86_64      2.5.1-3.el9         appstream       86 k
 python3.13-libs           x86_64      3.13.7-1.el9        epel           9.3 M
 python3.13-pip-wheel      noarch      25.1.1-1.el9        epel           1.2 M

연결 요약
================================================================================
설치  4 꾸러미

전체 내려받기 크기: 11 M
설치된 크기 : 43 M
진행할까요? [y/N]: y
꾸러미 내려받기 중:
(1/4): python3.13-3.13.7-1.el9.x86_64.rpm       238 kB/s |  30 kB     00:00    
(2/4): python3.13-pip-wheel-25.1.1-1.el9.noarch 2.4 MB/s | 1.2 MB     00:00    
(3/4): python3.13-libs-3.13.7-1.el9.x86_64.rpm  5.5 MB/s | 9.3 MB     00:01    
(4/4): mpdecimal-2.5.1-3.el9.x86_64.rpm          50 kB/s |  86 kB     00:01    
--------------------------------------------------------------------------------
합계                                            3.5 MB/s |  11 MB     00:03     
연결 확인 실행 중
연결 확인에 성공했습니다.
연결 시험 실행 중
연결 시험에 성공했습니다.
연결 실행 중
  준비 중     :                                                             1/1 
  설치 중     : python3.13-pip-wheel-25.1.1-1.el9.noarch                    1/4 
  설치 중     : mpdecimal-2.5.1-3.el9.x86_64                                2/4 
  설치 중     : python3.13-3.13.7-1.el9.x86_64                              3/4 
  설치 중     : python3.13-libs-3.13.7-1.el9.x86_64                         4/4 
  구현 중     : python3.13-libs-3.13.7-1.el9.x86_64                         4/4 
  확인 중     : mpdecimal-2.5.1-3.el9.x86_64                                1/4 
  확인 중     : python3.13-3.13.7-1.el9.x86_64                              2/4 
  확인 중     : python3.13-libs-3.13.7-1.el9.x86_64                         3/4 
  확인 중     : python3.13-pip-wheel-25.1.1-1.el9.noarch                    4/4 

설치되었습니다:
  mpdecimal-2.5.1-3.el9.x86_64         python3.13-3.13.7-1.el9.x86_64           
  python3.13-libs-3.13.7-1.el9.x86_64  python3.13-pip-wheel-25.1.1-1.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  8월 20 19:14 python3 -> python3.9
-rwxr-xr-x. 1 root root 15448  8월 15 17:35 python3.13
-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.13

$ sudo ln -Tfs python3.13 python3

$ ls -al python*

 

[ Execution Log ]

[gangserver@localhost bin]$ sudo ln -Tfs python3.13 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:34 python3 -> python3.13
-rwxr-xr-x. 1 root root 15448  8월 15 17:35 python3.13
-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.13.7
[gangserver@localhost ~]$ python
Python 3.13.7 (main, Aug 14 2025, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
[gangserver@localhost ~]$

 

 

반응형