How to install Python libraries

1 min

Libraries are one of the best way to share your scripts to the world and the world to use your python scripts.

Libraries are an aggregation of methods / scripts that developers have made along the years that serves a specific purpose.

Example:

  • Requests : Allow user to call APIs
  • Pandas : Allow user to manipulate data in the shape of excel sheet

If you want to use Python Libraries you will need a tool that is called a package manager.

The package manager is the tool that will download, install, and manage all the libraries for you so you don't have to bother managing it yourself.

In Python the libraries manager is called Pip, and we need to install it.

Installing Pip

Installation - pip documentation v22.2.2

Once you have pip install you can install any libraries with Python.

How to install a library

Now that pip is installed you can install any library that is referenced in the Python Package Manager.

pip install <library>
pip install pandas