How to Install Requests in Python - For Windows, Linux, Mac
Last Updated :
12 Jul, 2025
Requests is an elegant and simple HTTP library for Python, built for human beings. One of the most famous libraries for Python is used by developers all over the world. This article revolves around how one can install the requests library of Python in Windows/ Linux/ macOS using pip.
Install Requests Module in Python in Window
For installing requests in Windows, you need to Install Python (preferably the latest version) first, follow these simple steps to Install Python on Windows:
Steps to Install Python 3 on Windows
- Download the Installer:
- Visit the official Python website: python.org.
- Go to the Downloads section and click on “Download Python 3.x.x” (the latest version).
- Run the Installer:
- Locate the downloaded installer file (
python-3.x.x.exe
) and run it.
- Select Installation Options:
- Check the box that says “Add Python to PATH” at the bottom of the installer window.
- Choose “Install Now” for a standard installation or “Customize Installation” to choose specific features and installation location.
- Customize Installation (Optional):
- If you chose “Customize Installation,” select optional features like
pip
, tcl/tk
, and documentation. - Choose the installation location or accept the default.
- Complete the Installation:
- The installer will copy the necessary files and set up Python on your system.
- Once the installation is complete, you can close the installer.
Note: You may also refer to this article to get the in-depth details - How to download and install Python Latest Version on Windows
Now open the command prompt from Windows and run the following command:
python -m pip install requests
Booom..!! Done Now this is how you can install Requests Module using pip.
Install Requests Module in Python in Linux
For installing requests in Linux, you need to Install Python (preferably the latest version) first, follow these simple steps to Install Python on Linux:
Steps to Install Python 3 on Linux
Note: If you want to check if Python is already installed in your system then you may run this command in terminal: python --version (This will display the current running version of Python in your Linux)
- Download the Installer:
- Visit the official Python website: python.org.
- Go to the Downloads section and click on “Download Python 3.x.x” (the latest version).
- Run the Installer:
- Locate the downloaded installer file or use Linux distribution's package manager.
- Install Python:
- Run the following command to install Python: sudo apt python3
- Verify Python Installation:
- Once the installation is complete, verify it by running this command: python3 --version
Note: Alternatively, you may visit this article to read on Installation Guide:
How to download and install Python Latest Version on Linux
To install pip in linux: How to install PIP in Linux?
Install Requests Module in Python in MacOS
For installing requests in MacOS, you need to Install Python (preferably the latest version) first, follow these simple steps to Install Python on macos:
- Download the Installer:
- Visit the official Python website: python.org.
- Open the downloaded
.pkg
file (e.g., python-3.x.x-macosx.pkg
).
- Run the Installer:
- Locate the downloaded installer file and follow the on-screen instructions.
- Verify Python Installation:
- Once the installation is complete, verify it by running this command: python3 --version
Note: Alternatively, you may visit this article to read on Installation Guide:
Install Python Latest Version on MacOS
To install pip macOS. Run the following command
sudo easy_install pip
sudo pip install --upgrade pip
Now to install requests,
pip install requests
Alternative Methods
The last method for installation of requests on any operating system is to grab the base files and install requests manually and Requests is actively developed on GitHub, where the code is always available. For code -