I'm trying to use the OpenGeo Explorer plugin for QGIS (v2.6.1) to import shapefiles to my PostGIS database. I can connect to the server, but when I try to import, I get the following error: No module named ogr2ogrtopostgis I've been unable to find any reference to this module, or discussion of this error.

Windows 7

  • Sounds like a bug in the plugin (or plugin installer). Since the plugin is experimental, you probably should report that. Have you reported it?
    – BradHards
    Jan 13, 2015 at 5:32
  • github.com/boundlessgeo/suite-qgis-plugin/issues? should be the right target.
    – AndreJ
    Jan 13, 2015 at 7:47
  • No, I'll go ahead and do so. I usually assume the fault lies with myself first, then look to the tool. Thanks.
    – dwight
    Jan 14, 2015 at 15:10

1 Answer 1


I think that my experience could be help you. In python console with QGIS 2.4 (import gdal and import ogr work.) in QGIS 2.6.1 the same command give this errors:

import gdal Traceback (most recent call last): File "", line 1, in File "C:/PROGRA~2/QGISBR~1/apps/qgis/./python\qgis\utils.py", line 460, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: No module named gdal

well the problem is in the sys.path og python! Infact is missing the path to ogr.py and gdal.py

sys.path present in QGIS 2.4 'C:\PROGRA~2\QGISCH~1\apps\Python27\lib\site-packages\GDAL-1.11.0-py2.7-win32.egg'

in QGIS 2.6.1 is moved to 'C:\PROGRA~2\QGISCH~1\apps\Python27\lib\site-packages\osgeo' !?!?



import gdal

import ogr


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.