1. Install Python 3.12 (python, pip)
$ sudo dnf install python3.12 python3.12-pip
[gangserver@localhost pyqt5]$ sudo dnf install python3.12 python3.12-pip
마지막 메타자료 만료확인(4:39:41 이전): 2025년 02월 27일 (목) 오후 07시 11분 12초.
종속성이 해결되었습니다.
================================================================================
꾸러미 구조 버전 저장소 크기
================================================================================
설치 중:
python3.12 x86_64 3.12.9-1.el9 appstream 27 k
python3.12-pip noarch 23.2.1-4.el9 appstream 3.2 M
종속 꾸러미 설치 중:
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.9-1.el9 appstream 9.7 M
python3.12-pip-wheel noarch 23.2.1-4.el9 appstream 1.5 M
취약한 종속 꾸러미 설치 중:
python3.12-setuptools noarch 68.2.2-4.el9 appstream 1.6 M
연결 요약
================================================================================
설치 7 꾸러미
전체 크기: 16 M
전체 내려받기 크기: 16 M
설치된 크기 : 65 M
진행할까요? [y/N]: y
꾸러미 내려받기 중:
[SKIPPED] libnsl2-2.0.0-1.el9.x86_64.rpm: Already downloaded
(2/7): python3.12-3.12.9-1.el9.x86_64.rpm 5.0 kB/s | 27 kB 00:05
(3/7): mpdecimal-2.5.1-3.el9.x86_64.rpm 16 kB/s | 86 kB 00:05
(4/7): python3.12-pip-23.2.1-4.el9.noarch.rpm 122 kB/s | 3.2 MB 00:27
(5/7): python3.12-pip-wheel-23.2.1-4.el9.noarch 54 kB/s | 1.5 MB 00:27
(6/7): python3.12-setuptools-68.2.2-4.el9.noarc 215 kB/s | 1.6 MB 00:07
(7/7): python3.12-libs-3.12.9-1.el9.x86_64.rpm 233 kB/s | 9.7 MB 00:42
--------------------------------------------------------------------------------
합계 317 kB/s | 16 MB 00:51
연결 확인 실행 중
연결 확인에 성공했습니다.
연결 시험 실행 중
연결 시험에 성공했습니다.
연결 실행 중
준비 중 : 1/1
설치 중 : python3.12-pip-wheel-23.2.1-4.el9.noarch 1/7
설치 중 : mpdecimal-2.5.1-3.el9.x86_64 2/7
설치 중 : libnsl2-2.0.0-1.el9.x86_64 3/7
설치 중 : python3.12-3.12.9-1.el9.x86_64 4/7
설치 중 : python3.12-libs-3.12.9-1.el9.x86_64 5/7
설치 중 : python3.12-setuptools-68.2.2-4.el9.noarch 6/7
설치 중 : python3.12-pip-23.2.1-4.el9.noarch 7/7
구현 중 : python3.12-pip-23.2.1-4.el9.noarch 7/7
확인 중 : libnsl2-2.0.0-1.el9.x86_64 1/7
확인 중 : mpdecimal-2.5.1-3.el9.x86_64 2/7
확인 중 : python3.12-3.12.9-1.el9.x86_64 3/7
확인 중 : python3.12-libs-3.12.9-1.el9.x86_64 4/7
확인 중 : python3.12-pip-23.2.1-4.el9.noarch 5/7
확인 중 : python3.12-pip-wheel-23.2.1-4.el9.noarch 6/7
확인 중 : python3.12-setuptools-68.2.2-4.el9.noarch 7/7
설치되었습니다:
libnsl2-2.0.0-1.el9.x86_64
mpdecimal-2.5.1-3.el9.x86_64
python3.12-3.12.9-1.el9.x86_64
python3.12-libs-3.12.9-1.el9.x86_64
python3.12-pip-23.2.1-4.el9.noarch
python3.12-pip-wheel-23.2.1-4.el9.noarch
python3.12-setuptools-68.2.2-4.el9.noarch
완료되었습니다!
2. Changed from Python 3.9 to 3.12 (requires root privileges)
2.1 Check python version (Python 3.12 version not applicable)
$ python -V
[gangserver@localhost ~]$ python -V
Python 3.9.21
2.2 Change directory to /bin
$ cd /bin
[gangserver@localhost ~]$ cd /bin
[gangserver@localhost bin]$
2.3 Python file lookup
$ ls -al | grep python
[gangserver@localhost bin]$ ls -al | grep python
lrwxrwxrwx. 1 root root 9 2월 12 02:08 python -> ./python3
lrwxrwxrwx. 1 root root 9 2월 28 00:26 python3 -> python3.9
-rwxr-xr-x. 1 root root 15448 2월 6 21:56 python3.12
-rwxr-xr-x. 1 root root 15448 2월 12 02:09 python3.9
2.4 Delete python3 symbolic link file
$ sudo rm python3
[gangserver@localhost bin]$ sudo rm python3
2.5 Create python3 symbolic link python3.12
$ sudo ln -s python3.12 python3
[gangserver@localhost bin]$ sudo ln -s python3.12 python3
2.6 Confirm Change
[gangserver@localhost bin]$ ls -al | grep python
lrwxrwxrwx. 1 root root 9 2월 12 02:08 python -> ./python3
lrwxrwxrwx. 1 root root 10 2월 28 00:32 python3 -> python3.12
-rwxr-xr-x. 1 root root 15448 2월 6 21:56 python3.12
-rwxr-xr-x. 1 root root 15448 2월 12 02:09 python3.9
2.7 Check python version
$ python -V
[gangserver@localhost bin]$ python -V
Python 3.12.9
2.8 Run python
$ python
[gangserver@localhost bin]$ python
Python 3.12.9 (main, Feb 4 2025, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
[gangserver@localhost bin]$
- End -
[ 참조 ]
https://www.server-world.info/en/note?os=CentOS_Stream_9&p=python&f=4
'OS > CentOS' 카테고리의 다른 글
CentOS Stream 9 squirrel-sql-4.8.0.jar install error (0) | 2025.02.27 |
---|---|
CentOS Stream 9 : libgtk-x11-2.0.so.0 error when running Double Commander (0) | 2025.02.26 |
CentOS Stream 9 MariaDB Server Install / Uninstall (0) | 2025.02.26 |
CentOS Stream 9 htop install (0) | 2025.02.26 |
CentOS Stream 9 OpenJDK 11 Install / Uninstall (0) | 2025.02.26 |