How to install requests module in Python
Requests is a Python HTTP library, released under the Apache License 2.0. The goal of the project is to make HTTP requests simpler and more human-friendly. One of the most famous libraries for python used by developers all over the world.
Installation
Windows
Open command prompt from the windows and run following command:
python -m pip install requests
Linux
Run the following command in Linux
pip install requests
macOS
To install pip mac Os, run the following command:
sudo easy_install pip sudo pip install --upgrade pip
Now to install requests,
pip install requests
Alternative common method
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 .