LoginSignup
7

More than 1 year has passed since last update.

CentOS 7にPython 3.8をインストール(SCL)

Last updated at Posted at 2020-06-24

はじめに

Software Collection(SCL)を利用してCentOS7にPython 3.8をインストール
参考:Quick Start — Software Collections

サポート

本手法で導入した場合、Red Hat Software Collections Product Life Cycle - Red Hat Customer Portalより、2023-05 2024-06がEOLだと思われる。
それ以降に報告された脆弱性や不具合への対応は実施されない可能性がある。

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
... 略

各種確認

# 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.

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7