Install Python 3.8 on CentOS 7 using Software Collection (SCL) Reference: Quick Start — Software Collections
When introduced by this method, 2023-05 seems to be EOL from Red Hat Software Collections Product Life Cycle --Red Hat Customer Portal. Is done. Vulnerabilities and bugs reported after that may not be addressed.
LOG
# yum install -y centos-release-scl
# cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)
# yum install -y rh-python38 which
# scl enable rh-python38 bash
...Abbreviation
# which python{,2,3}
/opt/rh/rh-python38/root/usr/bin/python
/usr/bin/python2
/opt/rh/rh-python38/root/usr/bin/python3
# ll /opt/rh/rh-python38/root/usr/bin/python*
lrwxrwxrwx. 1 root root 9 Jun 24 10:31 /opt/rh/rh-python38/root/usr/bin/python -> ./python3
lrwxrwxrwx. 1 root root 9 Jun 24 10:31 /opt/rh/rh-python38/root/usr/bin/python3 -> python3.8
-rwxr-xr-x. 1 root root 15280 May 28 09:39 /opt/rh/rh-python38/root/usr/bin/python3.8
# python -V
Python 3.8.0
# python3 -V
Python 3.8.0
# yum info rh-python38
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: ftp.riken.jp
* centos-sclo-rh: ftp.riken.jp
* centos-sclo-sclo: ftp.riken.jp
* extras: ftp.riken.jp
* updates: ftp.riken.jp
Installed Packages
Name : rh-python38
Arch : x86_64
Version : 2.0
Release : 4.el7
Size : 0.0
Repo : installed
From repo : centos-sclo-rh
Summary : Package that installs rh-python38
License : GPLv2+
Description : This is the main package for rh-python38 Software Collection.
Recommended Posts