Python ogr2ogr command not found

206 views Asked by At

I have a python code that worked before, I converted data from shp to kml, I'm working on colab, I was getting the result with the following code after running all the necessary libraries, but my code has been giving the following error for about 1 month. What do you think could be the reason?

ogr2ogr -f KML {b}'.kml' {b}'.shp'

/bin/bash: ogr2ogr: command not found

ogr2ogr -f KML {b}'.kml' {b}'.shp'

/bin/bash: ogr2ogr: command not found

1

There are 1 answers

0
Mary M On

I also had this problem. I assume something must have changed in the default environment. Try adding the following command. It worked for me:

!apt-get install gdal-bin