I am running a Windows 7 machine with Python version 2.7.8 (32 bit). I installed QGIS 2.4 (Chugiak) from OSGeo4W and simply want to be able to import the QGIS Python modules (e.g. qgis.core) into the previously installed Python, in much the same way one can do so with arcpy.

I have Googled and set various folders in my PATH and PYTHONPATH environment variables but nothing seems to be able to let me say:

import qgis.core

I just get the ol' module not found error. Has anyone else had success?


  • It's probably to do with your path, you can adjust your system (environment) variables or use sys.path.append("c:\path\to\QGIS\libs") before import qgis.core. – Michael Stimson Jul 21 '14 at 0:48
  • 1
    I would recommend using the Python that is installed with QGIS. It contains PyQt and the other stuff QGIS needs. – Nathan W Jul 21 '14 at 1:13

Your Answer

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

Browse other questions tagged or ask your own question.