PIP stands for Python Package Index (PyPI). It is a package management system used for installation and management of software packages in Python. In this tutorial, you will learn how to install PIP on CentOS 7 system.
Before you start installation of PIP on your CentOS system, you should logged in as non-root user with sudo privileges.
Install PIP on CentOS
Follow the below steps to install PIP on your CentOS 7 system:
PIP is not available on CentOS 7 core repository. So you should add the EPEL repository using below command:
sudo yum install epel-release
Once the EPEL repository enabled then we can go ahead for install Pip and all its dependencies by using following command :
sudo yum install python-pip
Once the installation is finished you can verify installation by typing:
Version number of PIP may change with time. It will show output as below:
pip 8.1.2 from /usr/lib/python2.7/site-packages (python 2.7)
Installing Development Tools
You should required development tools to building python modules. You can install those using below command:
sudo yum install python-devel
sudo yum groupinstall 'development tools'
Manage Python Packages With Pip
Here, given few useful example of pip commands. Using it, we can install packages from PyPI, version control, local projects and from distribution files. Generally, you will install packages from PyPI.
For example, if you want to install
twisted package then, use the below command:
pip install twisted
You can uninstall a package by typing:
pip uninstall twisted
If you want to search any package from PyPI then you can do it using below command:
pip search "twisted"
After all these, if you want to list all installed packages then you should run following command:
If you want to list outdated packages then you just have to type:
pip list --outdated
You have learned how to install PIP on CentOS 7 system. Also you learnt how to manage Python packages using pip. You can get more details about pip from this guide.
If you have any question or suggestion leave a comment below.