How To Install Python Pip On CentOS 7

Introduction

Pip is a robust package management system designed to simplify the installation and management of all software packages compiled in Python. CentOS 7 doesn’t come with a pre-installed pip application, but you can easily install it from the command line.

One of the best and simplest way to install this package is to install distribution-provided Python pip modules using yum. The modules provided for distribution are authenticated and should work flawlessly with CentOS 7.

However, if there is no rpm package for the available modules you can utilize pip to install and configure python modules globally.

This tutorial will help you install and configure pip on using the yum package manager on CentOS 7.

Ready? Let’s get started!

Step 1
Installing pip

The first thing when installing pip on your CentOS system is to add an EPEL repository. This is because pip may not be present in the core repositories for CentOS 7. Execute the command below to activate the EPEL repository:

$ sudo yum install epel-release

Once you enable the EPEL repository, you can go ahead and run the command below to install pip and all its required dependencies:

$ sudo yum install python-pip

<

By now, the pip package is installed on CentOS 7, but we need to verify this installation. The command below will scrutinize pip installation and print the version installed:

$ pip --version

This will give you an output similar to the one below:

pip 8.1.2from/usr/lib/python2.7/site-packages (python 2.7)

Note: The version number of pip installation may vary.

Step 2
Installing The Development Tools

By now, pip is successfully installed on CentOS 7, but we are not done! We need to install development tools which are vital for creating Python modules. Execute the commands below to install the development tools:

$ sudo yum install python-devel
$ sudo yum groupinstall 'development tools'

That’s it! You have installed Python pip on CentOS 7. The next step is to learn how to use the application you just installed.

Step 3
Using pip

To use pip you must understand how its basic commands work. In this step, we’ll take you through some helpful basic pip commands that will help you install packages with ease.

Basically, pip is used to install packages from PyPI but it can also be used to install modules from local projects, Version Control, and other distribution files. Here, we’ll install the package twisted as our test package:

To install this package, execute the command:

$ pip install twisted

Then, to uninstall the package:

$ pip uninstall twisted

Next, if you want to search this package, you execute the command:

$ pip search "twisted"

If you want to view all installed packages, run the command below:

$  pip list

Lastly, to view a list of all outdated packages run the command;

$ pip list --outdated

Conclusion

Congratulations! You have successfully installed Python pip on CentOS 7 system. You can now use the application to install the Python modules that you require or uninstall those that you do not need.

Check out these top 3 Linux hosting services

HostArmada
$2.49 /mo
Starting price
Visit HostArmada
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.5
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.0
IONOS
$1.00 /mo
Starting price
Visit IONOS
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.3
Ultahost
$2.90 /mo
Starting price
Visit Ultahost
Rating based on expert review
  • User Friendly
    4.3
  • Support
    4.8
  • Features
    4.5
  • Reliability
    4.0
  • Pricing
    4.8
  • Click this link and all your queries to best hosting will end.

Part One: How to Monitor Nginx using Elastic Stack on a CentOS 7 VPS or Dedicated Server

This is Part I of a two-part tutorial explaining how to use the different compon
5 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Install and Configure Linux Malware Detect on CentOS 7

This tutorial will help you install and configure Linux Malware Detect (LMD) on
4 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to Install cPanel on a CentOS 7 VPS or Dedicated Server

This article provides step by step instructions on how to install cPanel on a Vi
3 min read
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO

How to install Django on a CentOS 7 VPS or Dedicated Server

When building a website, similar components are required, and you do not have to
3 min read
Mark Armistead
Mark Armistead
Author
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top