前の記事
構築編
環境確認編
OCIでのyumアップデート編
やってみたいこと
Pythonパッケージアプリpipモジュールを使えるようにする
1.EPELリポジトリの追加
yumコマンドでインストール
[opc@test-server ~]$ sudo yum install epel-release -y
Last metadata expiration check: 99:99:99 ago on Sun 99 XXX 2099 99:99:99 AM XXX.
Package oracle-epel-release-el9-1.0-1.el9.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[opc@test-server ~]$
2.pipインストール
2.1.pipインストール状況確認
2.2.pipインストール
dnfコマンドを実行してインストール
インストール
[opc@test-server ~]$ sudo dnf install python3-pip
Last metadata expiration check: 99:99:99 ago on Xxx 99 Xxx 2026 99:99:99 AM XXX.
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Installing:
python3-pip noarch 21.3.1-2.el9_8 ol9_appstream 3.0 M
Transaction Summary
================================================================================
Install 1 Package
Total download size: 3.0 M
Installed size: 8.8 M
Is this ok [y/N]: y
Downloading Packages:
python3-pip-21.3.1-2.el9_8.noarch.rpm 25 MB/s | 3.0 MB 00:00
--------------------------------------------------------------------------------
Total 24 MB/s | 3.0 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : python3-pip-21.3.1-2.el9_8.noarch 1/1
Running scriptlet: python3-pip-21.3.1-2.el9_8.noarch 1/1
Verifying : python3-pip-21.3.1-2.el9_8.noarch 1/1
Installed:
python3-pip-21.3.1-2.el9_8.noarch
Complete!
[opc@test-server ~]$
2.3.pipインストール状況確認
dnfコマンドで確認
dnfで確認
[opc@test-server ~]$ dnf list installed | grep pip
libpipeline.x86_64 1.5.3-4.el9 @System
python3-pip.noarch 21.3.1-2.el9_8 @ol9_appstream
python3-pip-wheel.noarch 21.3.1-2.el9_8 @ol9_baseos_latest
[opc@test-server ~]$
入っていることを確認。
pipコマンドの動作確認
#### pipの動作を確認 ```shell-session [opc@test-server ~]$ pip --version pip 21.3.1 from /usr/lib/python3.9/site-packages/pip (python 3.9) [opc@test-server ~]$ ``` バージョン表示で確認。最後に
記事の内容はCC BY-SA 4.0(著作者の情報とCCライセンス継承はお願いします。商用利用・改変・再配布は問題なし)です。