I'm developing a QGIS Plugin with python. I need to do a request to a REST server. But when I try to use request module "No module named requests" error displayed.

requests module is installed in my system, but I don't know why QGIS doesn't detect it.

What can I do?

My SO is Windows 7 Ultimate, and QGIS version installed is 2.14.3

  • 2
    Ignore QGIS for a moment. What happens when you do a import requests using a python command line? – BradHards Aug 1 '16 at 11:21
  • In a python comand line I can import requests without problem, but in QGis python console the error is: Traceback (most recent call last): File "<input>", line 1, in <module> File "C:/****/***/apps/qgis/./python\qgis\utils.py", line 572, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: No module named requests Same as plugin error. – Sergio Aug 2 '16 at 13:43
  • Are you sure the commad line Python is in the same place as the one QGIS uses? On windows, QGIS has its own python version, while there may be another in your PATH as well to be used outside QGIS. – AndreJ Aug 3 '16 at 12:57

You need install the missing library in the qgis path.

enter image description here

And that is installed correctly,on the osgeo4W shell ,write this pip list.

enter image description here

And ,after start qgis and check that is intalled correctly,with import requests


It appears that the requests package isn't installed for the python instance used by QGIS. Please see this question for tips on how to install python packages for QGIS.

  • When I write 'pip list' requests appears in list. But in QGis requests can´t import. – Sergio Aug 2 '16 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.