Requests is an elegant and simple HTTP library for Python, built for human beings. One of the most famous libraries for python used by developers al over the world. This article revolves around how one can install requests library of python in Windows/ Linux/ macOS, etc.
Installation
Windows
For installing requests in windows, one would require Python (preferably latest version), so if you don’t have python installed, head to – How to download and install Python Latest Version on Windows. Now open command prompt from the windows and run following command –
python -m pip install requests
Booom..!! Done Now, requests library is downloaded successfully.
Linux
For installing requests in linux, one would require Python (preferably latest version) and pip latest version, so if you don’t have python installed, head to – How to download and install Python Latest Version on Linux. To install pip in linux – How to install PIP in Linux?. Now run,
pip install requests
macOS
For installing requests in mac, one would require Python (preferably latest version) and pip latest version, so if you don’t have python installed, head to – How to download and install Python Latest Version on mac. To install pip mac Os. Run,
sudo easy_install pip sudo pip install --upgrade pip
Now to install requests,
pip install requests
Alternative common method
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 – visit here.
You can either clone the public repository:
git clone git://github.com/psf/requests.git
Or, download the tarball:
curl -OL https://github.com/psf/requests/tarball/master # 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 .
For documentation of requests library – visit here
Recommended Posts:
- How to Install Python Pandas on Windows and Linux?
- How to install Python on Windows?
- How to install OpenCV for Python in Windows?
- How to Install Python Tensorflow in Windows?
- How to install Python Pycharm on Windows?
- Guide to Install MongoDB with Python | Windows
- How to download and install Python Latest Version on Windows
- Convert Python Code to a Software to Install on Windows Using Inno Setup Compiler
- How to install Python on Linux?
- How to install OpenCV for Python in Linux?
- How to install Python Pycharm on Linux?
- How to download and install Python Latest Version on Linux
- How to install PIP on Windows ?
- Creating Python Virtual Environment in Windows and Linux
- How to install Anaconda on windows?
- How to Install Oracle Database 11g on Windows?
- How to install Jupyter Notebook in Windows?
- How to install PIP in Linux?
- How to install Anaconda on Linux?
- How to install Jupyter Notebook in Linux?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

