How to install a Python library

1 min readGetting Started
7-Day Challenge

Land Your First Data Science Job

A proven roadmap to prepare for $75K+ entry-level data roles. Perfect for Data Scientist ready to level up their career.

Build portfolios that hiring managers love
Master the Python and SQL essentials to be industry-ready
Practice with real interview questions from tech companies
Access to the $100k/y Data Scientist Cheatsheet

Join thousands of developers who transformed their careers through our challenge. Unsubscribe anytime.

You will need a package manager.

No worries,

It is probably already installed.

The major one is called pip

This will manage all your Python libraries in a single place.

The package indexer

If you are looking for a package it is probably referenced here :

PyPI · The Python Package Index
The Python Package Index (PyPI) is a repository of software for the Python programming language.

Check the library documentation

For every library there is a documentation,

Most of the time you will find the "How to install" section in the library documentation.

If you follow the commands they ask you to do everything should be fine.

The most basic installation command

The most common command with pip is the install command, it will install any package supplied to this command

pip install <package>
The most basic install command
pip install requests
An example with requests
pip3 install <package>
In case if you are working with Python3 (Recommended)
pip3 install requests
How to install requests in Python3

Here you are,  you should be all set to use this library in your Python workflow !

7-Day Challenge

Land Your First Data Science Job

A proven roadmap to prepare for $75K+ entry-level data roles. Perfect for Data Scientist ready to level up their career.

Build portfolios that hiring managers love
Master the Python and SQL essentials to be industry-ready
Practice with real interview questions from tech companies
Access to the $100k/y Data Scientist Cheatsheet

Join thousands of developers who transformed their careers through our challenge. Unsubscribe anytime.

Free Newsletter

Master Data Science in Days, Not Months 🚀

Skip the theoretical rabbit holes. Get practical data science skills delivered in bite-sized lessons – Approach used by real data scientist. Not bookworms. 📚

Weekly simple and practical lessons
Access to ready to use code examples
Skip the math, focus on results
Learn while drinking your coffee

By subscribing, you agree to receive our newsletter. You can unsubscribe at any time.