All Courses
How to Install PIP in Python

How to Install PIP in python

January 18th, 2020 General

What is PIP

To install libraries in Python we need PIP. PIP is a recursive acronym; it stands for either PIP Installs Packages or Preferred Installer Program.

How to install PIP

PIP will already be installed if you are using python version >= 2.7.9 or python version >= 3.4
If the python version is less than 2.7, follow the below steps to install PIP,
Step 1: Download https://bootstrap.pypa.io/get-pip.pyto a folder on your computer
Step 2: Open the folder containing the downloaded file get-pip.py and open a command prompt. Copy the highlighted path and paste it in the command prompt
PIP File Path
Step 3: Run python get-pip.py command in the command prompt
Get PIP in Python
Step 4: Now the pip is successfully installed

How to check if PIP is installed or not?

Step 1: Open command prompt: windows + r à Type cmd in search à Click ok
Run PIP Program
Step 2: A command prompt will be opened
PIP Comment Window
Step 3: Type pip – -version
PIP Version Type
Step 4: If you have PIP installed already, it will show the version of PIP available

How to upgrade pip?

Step 1: Open command prompt: windows + r à Type cmd in search à Click ok
Run PIP Program
Step 2: A command prompt will be opened
PIP Comment Window
Step 3: Type pip install – -upgrade pip
PIP Upgrated Version
If the available PIP in the machine is not the latest version, it will automatically download the latest version available.

How to install libraries using PIP?

What are Libraries?

After installing PIP in your machine, you can install other required libraries. Python has a wide range of libraries. Libraries consist of many in-build functions and methods that allow us to perform a lot of actions without writing any codes.
For example, if you are working with a data, libraries like pandas, numpy, matplotlib, etc., can be used to perform data transformation and visualizations, which will save a lot of time in writing codes
To install a library type pip install <packagename>  in command prompt and click enter, it will automatically download the required package.
Step 1: Let us know install numpy, , open a command prompt and type pip install numpy. Internet connectivity is necessary to install a package initially. It is case sensitive, everything should be in lowercase. After typing pip install numpy in command prompt, click enter, if the is not present in the list of packages available it will automatically get downloaded.
PIP Libraies Comment
Step 2: Upon successful installing, you could see successfully installed numpy -1.17.4(the version at the time of downloading)

Step 3: If you want to uninstall the package, use, pip uninstall numpy
PIP Comment Prompt
Step 4: If the required package is already present in your software, it will show the Requirement already satisfied
Comment Prompt
Step 5: The same way can be used to upgrade any required libraries that you want to use.

Pre-requisite: Python to be installed in the machine

 By default, Python is will not installed in the Windows operating system. The required version of Python can be downloaded from https://python.org/ or https://anaconda.org/

Related Blogs

Social Share:

0 responses on "How to Install PIP in python"

Leave a Message

Your email address will not be published. Required fields are marked *