How To Install PIP (Python Packages Management System) in Linux

In this article, we will learn How To Install PIP (Python Packages Management System) in Linux. PIP is a package management system used to install and manage software packages written in Python. Many packages can be found in the default source for packages and their dependencies — Python Package Index. PIP (repeated repetition for “Pip Installation Packages” or “Pip Installation Python”) is a cross-platform package manager for Python packages installed and managed (which can be found in the Python Package Index (PyPI)) Python 2> = 2.7.9 or Python 3> = 3.4 binaries which have been downloaded from python.org.

Follow the below steps to Install PIP (Python Packages Management System) in Linux:

To install Python Packages Management System (PIP) in Debian and Ubuntu, run the appropriate command for your distribution as follows:

Install PIP (Python Packages Management System) On Debian and Ubuntu System:

itsmarttricks@mangesh:~$ sudo apt install python-pip           #python 2
[sudo] password for itsmarttricks: 
Reading package lists... Done
Building dependency tree 
Reading state information... Done
python-pip is already the newest version (9.0.1-2.3~ubuntu1).
The following packages were automatically installed and are no longer required:
python3-pbr
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 184 not upgraded.
------------------------------------------------------------------------------
itsmarttricks@mangesh:~$ sudo apt install python3-pip           #python 3
Reading package lists... Done
Building dependency tree 
Reading state information... Done
The following packages were automatically installed and are no longer required:
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
dh-python libpython3-dev libpython3.6-dev python3-dev python3-distutils
python3-lib2to3 python3-setuptools python3-wheel python3.6-dev
Suggested packages:
python-setuptools-doc
The following NEW packages will be installed:
dh-python libpython3-dev libpython3.6-dev python3-dev python3-distutils
python3-lib2to3 python3-pip python3-setuptools python3-wheel python3.6-dev
0 upgraded, 10 newly installed, 0 to remove and 184 not upgraded.
Need to get 46.0 MB of archives.
After this operation, 81.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-lib2to3 all 3.6.7-1~18.04 [76.5 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-distutils all 3.6.7-1~18.04 [141 kB]
Fetched 46.0 MB in 21s (2,163 kB/s) 
Selecting previously unselected package python3-lib2to3.
(Reading database ... 189161 files and directories currently installed.)
Preparing to unpack .../0-python3-lib2to3_3.6.7-1~18.04_all.deb ...
Unpacking python3-lib2to3 (3.6.7-1~18.04) ...
Selecting previously unselected package python3-distutils.
Preparing to unpack .../1-python3-distutils_3.6.7-1~18.04_all.deb ...
Unpacking python3-distutils (3.6.7-1~18.04) ...
Selecting previously unselected package dh-python.
Preparing to unpack .../2-dh-python_3.20180325ubuntu2_all.deb ...
Unpacking dh-python (3.20180325ubuntu2) ...
Selecting previously unselected package libpython3.6-dev:amd64.
Unpacking python3-pip (9.0.1-2.3~ubuntu1) ...
Setting up python3-dev (3.6.7-1~18.04) ...

Also Read – How To Install Python 3.6 on Linux Using Terminal Interface

Install PIP (Python Packages Management System) On CentOS and RHEL System:

Unconsciously, PIP is not packaged in the official software repositories of CentOS/RHEL. So you need to enable the EPEL repository and then install it this way.

itsmarttricks@mangesh:~$ yum install epel-release
itsmarttricks@mangesh:~$ yum install python-pip

Install PIP (Python Packages Management System) on Fedora System:

itsmarttricks@mangesh:~$ dnf install python-pip	        #Python 2
itsmarttricks@mangesh:~$ dnf install python3		#Python 3

Install PIP(Python Packages Management System) on Arch Linux System:

itsmarttricks@mangesh:~$ pacman -S python2-pip	        #Python 2
itsmarttricks@mangesh:~$ pacman -S python-pip	        #Python 3

Install PIP (Python Packages Management System) on openSUSE System:

itsmarttricks@mangesh:~$ zypper install python-pip	#Python 2
itsmarttricks@mangesh:~$ zypper install python3-pip	#Python 3

How to Use PIP (Python Packages Management System) in Linux Systems?

Use these commands to install, uninstall, or find new packages.

itsmarttricks@mangesh:~$ pip install packageName
itsmarttricks@mangesh:~$ pip uninstall packageName
itsmarttricks@mangesh:~$ pip search packageName

To see the list of all commands:

itsmarttricks@mangesh:~$ pip help

Usage: 
pip <command> [options]

Commands:
install          Install packages.
download         Download packages.
uninstall        Uninstall packages.
freeze           Output installed packages in requirements format.
list             List installed packages.
show             Show information about installed packages.
check            Verify installed packages have compatible dependencies.
search           Search PyPI for packages.
wheel            Build wheels from your requirements.
hash             Compute hashes of package archives.
completion       A helper command used for command completion.
help             Show help for commands.

General Options:
-h, --help                       Show help.
--isolated                       Run pip in an isolated mode, ignoring environment variables and user configuration.
-v, --verbose                    Give more output. Option is additive, and can be used up to 3 times.
-V, --version                    Show version and exit.
-q, --quiet                      Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING,
                                 ERROR, and CRITICAL logging levels).
--log <path>                     Path to a verbose appending log.
--proxy <proxy>                  Specify a proxy in the form[user:passwd@]proxy.server:port.
--retries <retries>              Maximum number of retries each connection should attempt (default 5 times).
--timeout <sec>                  Set the socket timeout (default 15 seconds).
--exists-action <action>         Default action when a path already exists:(s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
--trusted-host <hostname>        Mark this host as trusted, even though it does not have valid or any HTTPS.
--cert <path>                    Path to alternate CA bundle.
--client-cert <path>             Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.
--cache-dir <dir>                Store the cache data in <dir>.
--no-cache-dir                   Disable the cache.
--disable-pip-version-check      Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.

Also Read – A Guide to Kill, Pkill and Killall Commands to Stop the Process in Linux(Kill Process Linux)

That’s all, In this article, we have explained the How To Install (Python Packages Management System) PIP  in Linux. I hope you enjoy this article. If you like this article, then just share it. If you have any questions about this article, please comment.

Share this:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Exit mobile version