[root@AWSCLI ~]# cat /etc/redhat-release Red Hat Enterprise Linux release 8.0 (Ootpa)
[root@AWSCLI ~]#
デフォルトでは python コマンドが存在しない
何も考えずに python コマンドを実行すると「command not found」のエラーが出力されます。
[root@AWSCLI ~]# python
-bash: python: command not found
[root@AWSCLI ~]#
yum search コマンドで Python 3.6 が利用できるか確認します。
[root@AWSCLI ~]# yum search python36
Last metadata expiration check: 0:48:46 ago on Sun 12 May 2019 01:49:57 PM UTC.
==================================== Name Exactly Matched: python36 ==================================== python36.x86_64 : Interpreter of the Python programming language
======================================== Name Matched: python36 ======================================== python36-debug.x86_64 : Debug version of the Python runtime python36-devel.x86_64 : Libraries and header files needed for Python development python36-rpm-macros.noarch : RPM macros for building RPMs with Python 3.6
[root@AWSCLI ~]#
yum install コマンドで Python 3.6 をインストールします。
python 3.6 をインストールすると pip コマンドも一緒にインストールされます。
[root@AWSCLI ~]# yum install python36
Last metadata expiration check: 0:54:00 ago on Sun 12 May 2019 01:49:57 PM UTC.
Dependencies resolved.
========================================================================================================
Package Arch Version Repository Size
========================================================================================================
Installing: python36 x86_64 3.6.8-2.module+el8.0.0+2975+e0f02136 rhui-rhel-8-appstream-rhui-rpms 19 k
Installing dependencies: python3-pip noarch 9.0.3-13.el8 rhui-rhel-8-appstream-rhui-rpms 18 k
Enabling module streams:
python36 3.6
コメント