0

I've been trying to install the GDAL Python package on my MacOS Mojave 10.14.1.

I ran the following:

brew install gdal

This works fine, though I do get this warning (https://github.com/Homebrew/homebrew-core/issues/34783). I read that it could be safely ignored, though when I try to run:

pip install GDAL

I get the following error log here (https://pastebin.com/nsfj86Jg):

The important bit is that it doesn't appear able to locate standard C++ include files, resulting in the build failure.

warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
extensions/gdal_wrap.cpp:3096:10: fatal error: 'stdexcept' file not found
#include <stdexcept>
         ^~~~~~~~~~~

I'm not sure how to specify the compiler to use from pip, I assume it has to be done elsewhere, or that I'm missing something else completely.

0

You can get GDAL with python bindings and command line utilities from NextGIS Installer (http://nextgis.com/nextgis-qgis/). Just uncheck everything except gdal utilities in installer. Also, I recommend to uninstall GDAL from brew, because conflicts may occur.

enter image description here

In this case no compilation needed.

Otherwise you will need to install the XCode or gcc.

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.