yum検索で最新のPythonバージョンが見つからないのはなぜですか?

yum検索で最新のPythonバージョンが見つからないのはなぜですか?

yumcentos.orgのドキュメントによると、yum searchコマンドを使用してすべてのリポジトリ内のすべてのパッケージを見つけることができます。

ヤム検索

このコマンドは、すべてのリポジトリ内のRPMの説明、要約、パッケージプログラム、およびパッケージ名フィールドで指定されたキーワードを含むすべてのパッケージを検索します。

ただし、このコマンドを使用して最新のPython 3バージョンを見つけることはできません。理由がわかりますか?

[root@CentOS7 centos]# yum search python | grep 3
python-backports-lzma.x86_64 : Backport of Python 3.3's lzma module
                                           : from Python 3
python-enum34.noarch : Backport of Python 3.4 Enum
python-gssapi.x86_64 : Python Bindings for GSSAPI (RFC 2743/2744 and extensions)
python-ipaddress.noarch : Port of the python 3.3+ ipaddress module to 2.6+
python-six.noarch : Python 2 and 3 compatibility utilities
python-urllib3.noarch : Python HTTP library with thread-safe connection pooling
python-zope-interface.x86_64 : Zope 3 Interface Infrastructure
[root@CentOS7 centos]# 

次に、現在このオペレーティングシステムでPython 2.7.5を使用でき、最新のPython 3もインストールしたいと思います。

[root@CentOS7 centos]# python -V
Python 2.7.5
[root@CentOS7 centos]# 

yum installコマンドでこれを行うことができないのはなぜですか?

ヤムの設置

最新バージョンのパッケージまたはパッケージセットをインストールするために使用されます。指定されたパッケージ名と一致するパッケージがない場合は、シェルグローブとみなされ、一致するすべての項目がインストールされます。

[root@CentOS7 centos]# yum install python3
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.usonyx.net
 * extras: centos.usonyx.net
 * updates: centos.usonyx.net
No package python3 available.
Error: Nothing to do
[root@CentOS7 centos]# 

[root@CentOS7 centos]# yum install python-3
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.usonyx.net
 * extras: centos.usonyx.net
 * updates: centos.usonyx.net
No package python-3 available.
Error: Nothing to do
[root@CentOS7 centos]# 

引用:

https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s1-yum-useful-commands.html

https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-centos-7

ベストアンサー1

RHELリポジトリには公式のPython v3.xはありません。 RHEL 7はPython 2.7に基づいています。

ただし、RH は RH ソフトウェアのコレクションを通じて、一部のパッケージの最新バージョンを提供しています。

https://access.redhat.com/support/policy/updates/rhscl

Python 3.3と3.4があります。

CentOSの場合は、SCLが利用可能である必要があります。

https://www.softwarecollections.org/en/

おすすめ記事