I am working whit geopdf to obtain the layers. When I use driver = ogr.GetDriverByName('PDF') it return None, and obviously I can't open it.

I have checked with the command gdalinfo --formats and it is the result in OSGeo4W enter image description here

and this another when I use python 3.6 whit anaconda prompt enter image description here

someone know why is completely different? I have downloaded gdal from anaconda.

  • 3
    Do you mean that you may be using two different GDAL binaries? Drivers to be included are selected when GDAL is compiled. – user30184 Apr 3 '19 at 10:02
  • I mean that, yes, I have 2 differents gdal install one in Osgeo4W and another in python, I have cheked and the version are different, must be that is the problem... is posible conected the Osgeo4w gdal version whit python 3.6? thanks – corting Apr 3 '19 at 13:05
  • 1
    Why don't you run Python from OSGeo4W Shell? The py3_env.bat sets the environment for Python 3. – user30184 Apr 3 '19 at 13:27
  • how can I do that?, because I need create an script, not execute that from the shell. thanks – corting Apr 3 '19 at 14:00

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.