A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/python/how-to-install-requests-in-python-for-windows-linux-mac/ below:

How to Install Requests in Python - For Windows, Linux, Mac

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
  1. Download the Installer:
  2. Run the Installer:
  3. Select Installation Options:
  4. Customize Installation (Optional):
  5. Complete the Installation:

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)

  1. Download the Installer:
  2. Run the Installer:
  3. Install Python:
  4. Verify Python Installation:

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:

  1. Download the Installer:
  2. Run the Installer:
  3. Verify Python Installation:

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 -

You can either clone the public repository:

git clone git://github.com/psf/requests.git

Or, download the tarball:

curl -OL https://codeload.github.com/psf/requests/legacy.tar.gz/main
# optionally, zipball is also available (for Windows users).

Once you have a copy of the source, you can embed it in your own Python package, or install it into your site-packages easily:

cd requests
pip install .
Troubleshooting Tips

While installing Requests, you might encounter some issues. Here are a few troubleshooting tips for different operating systems:

  1. pip not recognized (Windows or macOS):
  2. Permission Issues (Linux/macOS):
  3. Outdated pip Version:
  4. Version Conflicts (Multiple Python Versions):
Conclusion

Installing the Requests library in Python is straightforward on Windows, Linux, and macOS. If you're looking to manage HTTP requests or interact with APIs, the Requests library is an essential tool for your Python projects.

By following the steps outlined in this guide, you can easily set up Requests on any major operating system. Make sure you’re using the latest versions of Python and pip to ensure compatibility with the latest updates to Requests.



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4