How to Install Pip on CentOS 7

前端之家收集整理的这篇文章主要介绍了How to Install Pip on CentOS 7前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

https://www.liquidweb.com/kb/how-to-install-pip-on-centos-7/
@H_502_2@

Pip is a tool for installing and managing Python packages.@H_502_2@

Python is a programming language. It is quite popular and has a design philosophy that emphasizes code readability. It is widely considered to be a very easy programming language to learn and master because of its focus on readability. Python is open source,and will run a a multitude of platforms including,but not limited to: VarIoUs Linux/UNIX distributions (CentOS,Ubuntu,Fedora,Debian,etc.),Microsoft Windows,and Mac OS X.@H_502_2@

Pre-Flight Check
  • These instructions are intended specifically for installing Pip,a tool for installing and managing Python packages.
  • I’ll be working from a Liquid Web Core Managed CentOS 7 server,and I’ll be logged in as root.

@H_502_2@

There are two options for installing Pip. Use either Option #1 or Option #2 below.@H_502_2@

Option #1: Install Pip with Yum,Step #1: Add the EPEL Repository

Pip is part of Extra Packages for Enterprise Linux (EPEL),which is a community repository of non-standard packages for the RHEL distribution. First,we’ll install the EPEL repository:@H_502_2@

rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm@H_502_2@

As a matter of best practice we’ll update our packages:@H_502_2@

yum -y update@H_502_2@

Then let’s install python-pip and any required packages:@H_502_2@

yum -y install python-pip@H_502_2@

And skip toStep #3.@H_502_2@

Option #2: Install Pip with Curl and Python
Note: If you installed Pip with the prevIoUs Option,then SKIP this step.

We can also use curl and python to download and install Pip.@H_502_2@

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"@H_502_2@

python get-pip.py@H_502_2@

Step #3: Verify The Installation

View a list of helpful commands:@H_502_2@

pip --help@H_502_2@

Check the version of Pip that is installed:@H_502_2@

pip -V@H_502_2@

Which should yield something similar to:@H_502_2@

pip 1.3.1 from /usr/lib/python2.7/site-packages (python 2.7)@H_502_2@

猜你在找的CentOS相关文章