Where to download python requests library

sunhux used Ask the Experts™

Refer to the above url: I've got python 2.7 installed successfully on my Win XP
ie one of the pre-requisite but still missing  "requests library" :

When I ran the py script in above url, got the error below:  reckon it's due to
the missing requests lib
importError :
  C:\rootc\strut>python struts-pwn.py --check --url 'http://www.google.com'
 Traceback (most recent call last):
   File "struts-pwn.py", line 13, in <module>
     import requests
 ImportError: No module named requests

The closest I got to download the requests lib is the link below but
I have difficulty registering or login via Google:

It simply prompts me back for a login id when attempting to register.

Anyone has a ready copy for Win XP (32bit) that can be attached here?

I'll later need the same requests lib for python 3.x
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®


I miss clarifying : when clicking on "Register" button, I kept getting "Page could not be found"

Any other better source to get this?
Top Expert 2016
have you tried
pip install requests

Open in new window

What exact version of python 2.7 do you have?

The current download link would be:

There is no need to login or register. The link should just work, except of course the company you're working in or the country you're living in is messing around with your web connection.

Or perhaps as , as your OS is windows XP and there are no more security updates you got infected and some plugin  is messing around with your http requests?

If your python 2.7 version is rather recent, then you should have pip already installed with it.

If python.exe is for example in C:\Python27\python.exe, then pip should be located in c:\Python27\Scripts\pip.exe

If you type
C:\Python27\Scripts\pip.exe install requests

Open in new window

it should download and install pip even if your browser got hijacked.

To verify whether the pip install worked just type:
C:\Python27\Scripts\pip.exe freeze 

Open in new window

and check the output

If you do not have pip installed, then you could try follow the instructions at :https://pip.pypa.io/en/stable/installing/.

The steps are basically:

Download the script https://bootstrap.pypa.io/get-pip.pyget-pip.py
Execute the script get-pip.py

if downloading get-pip.py fails as well, then tell us  and we might find another suggestion / solution
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!


Ok, got some progress:

C:\rootc\strut>pip install results
Collecting results
  Could not find a version that satisfies the requirement results (from versions
: )
No matching distribution found for results
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm

C:\rootc\strut>python -m pip install --upgrade pip
Collecting pip
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
    100% |################################| 1.3MB 40kB/s
Installing collected packages: pip
  Found existing installation: pip 7.1.2
    Uninstalling pip-7.1.2:
      Successfully uninstalled pip-7.1.2

D:\Python27\Scripts>pip.exe install requests
Collecting requests
  Downloading requests-2.13.0-py2.py3-none-any.whl (584kB)
    100% |################################| 593kB 71kB/s
Installing collected packages: requests
Successfully installed requests-2.13.0


One query:
will pip install on a PC that has to go thru a proxy?
Or it needs to be direct Internet (eg: Broadband at home)?
Perfect! requests should be installed now.

Does your application work now?

by default pip tries up to my knowledge a direct internet connection.
however you can tell pip to use a proxy.

You get the helptext by typing
pip -h

Open in new window

pip --proxy =user:pass@host:port install package

Open in new window

should work.

However I don't have a proxy server here, so I can't test

Instead of passing the parameter --proxy you might try to set:
SET HTTPS_PROXY=<user>:<pass>@<proxyHost>:<proxyPort>

Open in new window

before calling pip

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial