Installing packages in python using PIP

Get started learning Python with DataCamp's free Intro to Python tutorial. Learn Data Science by completing interactive coding challenges and watching videos by expert instructors. Start Now!

PIP is a package management system used to install packages from repository. You can use pip to install various software packages available on  pip is much similar to composer in php. Pip is a recursive acronym which stands for  pip installs packages.

Installing pip

Python 2.7.9 and later (python2 series), and Python 3.4 and later (python 3 series) already comes with pip.

To check your python version you need to enter the following command :

If your python version do not belong to any of above mentioned versions then you need to manually install pip (see links below) .

Click here for windows installation instructions .
Click here for linux instructions .

Installing packages

Suppose you want to install a package called requests (which is used to make HTTP requests). You need to issue the following command.

Note: pip.exe  is stored under C:\Python34\Scripts , so you need to go there to install packages. Alternatively add the whole path to PATH environment variable. This way you can access pip from any directory.

Uninstalling packages

To uninstall the package use the command below.

Upgrade Package

Searching for a package

Note: You don’t need to add quotes around your search term.

Listing installed packages

above command will list all the installed packages.

Listing outdated installed packages

Details about installed packages

You can use the following command to get information about a installed package, i.e Package name, version, location, dependencies.


Other Tutorials

This site generously supported by DataCamp. DataCamp offers online interactive Python Tutorials for Data Science. Join over a million other learners and get started learning Python for data science today!

Leave a Reply

1 Comment threads
1 Thread replies
Most reacted comment
Hottest comment thread
2 Comment authors
pythongururootRiyaz Recent comment authors
newest oldest most voted
Notify of

Can these codes work also on macOS?


Yes sure.