I am trying to help out a friend of mine. She learnt GIS in school in the past using ArcGIS but has recently installed QGIS package on her Mac OSX.

When she tries to render raster into shapefile, she gets error that gdal_polygonize.py is not found.

Does it file come with a specific python package?

I could not find this exact file on the Internet. As a side note, she is able to import the gdal package in her Python.

Can anybody help?

2 Answers 2


She will need the GDAL package, which comes with the gdal_polygonize.py script when python support is enabled at compile time.

It sounds like she already has the python bindings installed, so she likely already has GDAL. If she can locate the GDAL install directory, try looking under its /bin subdirectory--it should be there.

If she finds it, just add <gdal directory>/bin to her $PATH so gdal_polygonize.py can be executed without specifying the full path.

If she can't find it, she'll need to either download a Mac OS binary distribution, or compile from source.


Installing GDAL package adds the gdal_polygonize.py file by default. You can find the file in gdal folder/Lib/site-packages/GDAL-2.2.2-py3.6-win-amd64.egg-info/scripts. This is for windows and a similar trace can be done for a mac/other OS systems. You can copy that file and paste that in the working directory to import or can add the directory itself

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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