Skip to content
Related Articles

Related Articles

Linux – Installing PIP to Manage Python Packages
  • Last Updated : 19 Feb, 2021

Python is the most popular language for a decade, and we all know that python had a huge support of libraries that are used in different sectors of Software Engineering. Meanwhile, PIP also getting its fame along with python in Linux and developers community.PIP is a package manager for python in handling the software packages that are developed using python.PIP helps us in keeping track of python packages installed on your system, and complexity increases when two opensource project meets each other i.e installing and using PIP on Linux.

Installing PIP on Linux:

Linux is just a kernel and coming to reality there are a lot of distributions out there. Every distribution had its own respective commands based on the package managers used. Here are some famous distributions.

Debian:

For Python 2: 

$ sudo apt install python-pip python-setuptools

For Python 3:



$ sudo apt install python3-pip

Red Hat Linux: 

$sudo yum install python-pip python-devel python-setuptools

Arch Linux:

$ sudo pacman -S python-pip python3-setuptools

These are the few popular Linux distributions that most people use and by executing the respective commands your machine will be provided with pip package manager on it. 

How To Install PIP to Manage Python Packages in Linux

Installing PIP on Linux

Getting More out of PIP

PIP is like an appstore for python. Using this powerful tool you can enhance your usage and abilities as a Python programmer. Most libraries and frameworks such as Pandas, Numpy, Django, Flask, Matplotlib help you in some crucial tasks like data analysis, visualization of data, Building responsive Websites, etc, and you get all those functionalities through importing those libraries into your code. So PIP takes care of such software packages. Installation, Updating, Upgrading, Degrading of these packages can be handled with some simple commands with the help of PIP. For a short overview just run $ pip(version no) –help in your terminal and this will show some simple syntax and its usage as shown below.

How To Install PIP to Manage Python Packages in Linux

This gives an overview of commands.

Managing Packages Using PIP

Now we will see some simple tasks like Installing a Package, Upgrading and uninstalling through running some simple commands in your terminal.

Installing a Package 

Installing the Latest Version: 

$ sudo pip install packageName.

Installing Specific Version: 

$ sudo pip install packageName==version number.

Installing Beta version:

$ sudo pip install --pre packageName
How To Install PIP to Manage Python Packages in Linux

Installing Package pandas using PIP

Upgrading a Package:

$ sudo pip install --upgrade packageName
How To Install PIP to Manage Python Packages in Linux

Upgrading Package using PIP

Uninstalling a Package:

$ sudo pip uninstall packageName
How To Install PIP to Manage Python Packages in Linux

uninstalling a package using PIP

Listing a Package:

$ pip list  --format columns
How To Install PIP to Manage Python Packages in Linux

List of packages installed on system.

 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.  

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course

My Personal Notes arrow_drop_up
Recommended Articles
Page :