RHEL / CentOS 安裝 PIP

PIP 是 Python 的套件管理工具, 以下紀錄一下在 RHEL / CentOS 安裝 PIP 的方法:

首先要安裝 EPEL repo, 不同版本需要安裝不同的 rpm:

RHEL / CentOS 7.x (x86_64)
rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

RHEL / CentOS 6.x (x86_64)
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

RHEL / CentOS 6.x (i386)
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

RHEL / CentOS 5.x (x86_64)
rpm -ivh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

RHEL / CentOS 5.x (i386)
rpm -ivh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

安裝 PIP:

yum install python-pip

用 yum 安裝好 PIP 後, 可以輸入 which pip 確認一下。




Leave a Reply