AlmaLinux OS 9にPythonをインストール(pip)
環境確認
$ cat /etc/redhat-release AlmaLinux release 9.5 (Teal Serval)
Python
インストール
通常はインストールされているっぽい。入ってない場合はインストールする。
$ dnf install python3
確認
$ python3 -V
Python 3.9.21
$ which python3
/usr/bin/python3
$ dnf info python3
インストール済みパッケージ
名前 : python3
バージョン : 3.9.21
リリース : 1.el9_5
Arch : x86_64
サイズ : 32 k
ソース : python3.9-3.9.21-1.el9_5.src.rpm
リポジトリー : @System
repo から : baseos
概要 : Python 3.9 interpreter
URL : https://www.python.org/
ライセンス : Python
説明 : Python 3.9 is an accessible, high-level, dynamically typed, interpreted
: programming language, designed with an emphasis on code readability.
: It includes an extensive standard library, and has a vast ecosystem of
: third-party libraries.
:
: The python3 package provides the "python3" executable: the reference
: interpreter for the Python language, version 3.
: The majority of its standard library is provided in the python3-libs package,
: which should be installed automatically along with python3.
: The remaining parts of the Python standard library are broken out into the
: python3-tkinter and python3-test packages, which may need to be installed
: separately.
:
: Documentation for Python is provided in the python3-docs package.
:
: Packages containing additional libraries for Python are generally named with
: the "python3-" prefix.
pip
インストール
$ dnf install python3-pip
確認
$ pip -V
pip 21.3.1 from /usr/lib/python3.9/site-packages/pip (python 3.9)
$ which pip
/usr/bin/pip
$ dnf info python3-pip
インストール済みパッケージ
名前 : python3-pip
バージョン : 21.3.1
リリース : 1.el9
Arch : noarch
サイズ : 8.8 M
ソース : python-pip-21.3.1-1.el9.src.rpm
リポジトリー : @System
repo から : appstream
概要 : A tool for installing and managing Python3 packages
URL : https://pip.pypa.io/
ライセンス : MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD)
説明 : pip is a package management system used to install and manage software packages
: written in Python. Many packages can be found in the Python Package Index
: (PyPI). pip is a recursive acronym that can stand for either "Pip Installs
: Packages" or "Pip Installs Python".