You are getting this error because you have not installed the request module. Because requests are not a built in module (it does not come with the default python installation), so you will have to install it in order to run it properly.
Installation steps for OSX/Linux:-
If you have pip installed in your system use
$ sudo pip install requests
An alternative way is also there for that you can also use if you have easy_install installed.
sudo easy_install -U requests
For centos you can use:
yum install python-requests
In Windows you can install it by as follows:-
If in your system pip is installed and you have added pip.exe to the Path Environment Variable. You can use:-
pip install requests
For adding the library manually to a windows machine, you can download the compressed library, uncompress it, and then place it into the Lib\site-packages folder of your python path. (For example: C:\Python27\Lib\site-packages)