"ImportError: no module named 'requests'" after installing with pip

user3654181 picture user3654181 · May 29, 2015 · Viewed 99.3k times · Source

I am getting ImportError : no module named 'requests'.

But I have installed the requests package using the command pip install requests.

On running the command pip freeze in the command prompt, the result is

requests==2.7.0

So why is this sort of error happening while running the python file?

Answer

Isak La Fleur picture Isak La Fleur · May 29, 2015

Run in command prompt.

pip list

Check what version you have installed on your system if you have an old version.

Try to uninstall the package...

pip uninstall requests

Try after to install it:

pip install requests

You can also test if pip does not do the job.

easy_install requests