I've just installed GDAL, but I don't know how to import/use ogr2ogr.

I've tried:

from osgeo import gdal
from osgeo import ogr

and searched both for ogr2ogr, but it wasn't there.

  • I think the link in the answer is a much more likely duplicate @Simbamangu
    – bozdoz
    Mar 25, 2014 at 18:44

1 Answer 1


According to the answer posted by @elevine:

How do I use ogr2ogr to convert a GML to shapefile in Python

There is a ogr2ogr Python port which you can get here:


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