title: pip3 install gdal ERROR: Command errored out with exit status 1
body: <p>Premise:
  I have a macbook-pro with Catalina (10.15.4), I have installed: python 3.7 and the GDAL 2.4 and Qgis 3.12 library. (I don't use anaconda or miniconda and I installed homebrew)</p>
  
  <p>Everything stems from the difficulty of executing a particular project that takes data on Corona Virus Italia from Github and processes them daily with Qgis (<a href="https://github.com/pigreco/COVID-19_ITA" rel="nofollow noreferrer">https://github.com/pigreco/COVID-19_ITA</a>).</p>
  
  <p>As you can see, the project was made for both windows and OSX, in order to run it you need to install the DataPloty plugin.</p>
  
  <p>The problem with Python 3.7</p>
  
  <p>I have been trying for many days to understand this problem with python3 when I try to install gdal, which does not allow me to view the graphics processing :</p>
  
  <pre><code>    pip3 install gdal
  Collecting gdal
    Using cached GDAL-3.0.4.tar.gz (577 kB)
  Installing collected packages: gdal
      Running setup.py install for gdal ... error
      ERROR: Command errored out with exit status 1:
       command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-install-on9vchph/gdal/setup.py'"'"'; __file__='"'"'/private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-install-on9vchph/gdal/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-record-z5yq4g0d/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/gdal
           cwd: /private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-install-on9vchph/gdal/
      Complete output (84 lines):
      running install
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.6-intel-3.7
      copying gdal.py -&gt; build/lib.macosx-10.6-intel-3.7
      copying ogr.py -&gt; build/lib.macosx-10.6-intel-3.7
      copying osr.py -&gt; build/lib.macosx-10.6-intel-3.7
      copying gdalconst.py -&gt; build/lib.macosx-10.6-intel-3.7
      copying gdalnumeric.py -&gt; build/lib.macosx-10.6-intel-3.7
      creating build/lib.macosx-10.6-intel-3.7/osgeo
      copying osgeo/gnm.py -&gt; build/lib.macosx-10.6-intel-3.7/osgeo
      copying osgeo/__init__.py -&gt; build/lib.macosx-10.6-intel-3.7/osgeo
      copying osgeo/gdalnumeric.py -&gt; build/lib.macosx-10.6-intel-3.7/osgeo
      copying osgeo/osr.py -&gt; build/lib.macosx-10.6-intel-3.7/osgeo
      copying osgeo/gdal.py -&gt; build/lib.macosx-10.6-intel-3.7/osgeo
      copying osgeo/ogr.py -&gt; build/lib.macosx-10.6-intel-3.7/osgeo
      copying osgeo/gdal_array.py -&gt; build/lib.macosx-10.6-intel-3.7/osgeo
      copying osgeo/gdalconst.py -&gt; build/lib.macosx-10.6-intel-3.7/osgeo
      Fixing build/lib.macosx-10.6-intel-3.7/gdal.py build/lib.macosx-10.6-intel-3.7/ogr.py build/lib.macosx-10.6-intel-3.7/osr.py build/lib.macosx-10.6-intel-3.7/gdalconst.py build/lib.macosx-10.6-intel-3.7/gdalnumeric.py build/lib.macosx-10.6-intel-3.7/osgeo/gnm.py build/lib.macosx-10.6-intel-3.7/osgeo/__init__.py build/lib.macosx-10.6-intel-3.7/osgeo/gdalnumeric.py build/lib.macosx-10.6-intel-3.7/osgeo/osr.py build/lib.macosx-10.6-intel-3.7/osgeo/gdal.py build/lib.macosx-10.6-intel-3.7/osgeo/ogr.py build/lib.macosx-10.6-intel-3.7/osgeo/gdal_array.py build/lib.macosx-10.6-intel-3.7/osgeo/gdalconst.py
      Skipping optional fixer: ws_comma
      Fixing build/lib.macosx-10.6-intel-3.7/gdal.py build/lib.macosx-10.6-intel-3.7/ogr.py build/lib.macosx-10.6-intel-3.7/osr.py build/lib.macosx-10.6-intel-3.7/gdalconst.py build/lib.macosx-10.6-intel-3.7/gdalnumeric.py build/lib.macosx-10.6-intel-3.7/osgeo/gnm.py build/lib.macosx-10.6-intel-3.7/osgeo/__init__.py build/lib.macosx-10.6-intel-3.7/osgeo/gdalnumeric.py build/lib.macosx-10.6-intel-3.7/osgeo/osr.py build/lib.macosx-10.6-intel-3.7/osgeo/gdal.py build/lib.macosx-10.6-intel-3.7/osgeo/ogr.py build/lib.macosx-10.6-intel-3.7/osgeo/gdal_array.py build/lib.macosx-10.6-intel-3.7/osgeo/gdalconst.py
      Skipping optional fixer: ws_comma
      running build_ext
      gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c gdal_python_cxx11_test.cpp -o gdal_python_cxx11_test.o
      gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c gdal_python_cxx11_test.cpp -o gdal_python_cxx11_test.o -std=c++11
      creating var
      creating var/folders
      creating var/folders/6v
      creating var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn
      creating var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T
      gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c /var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpvdsuhy2e.cpp -o var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpvdsuhy2e.o -Wno-error=unused-command-line-argument-hard-error-in-future
      warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
      warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
      2 warnings generated.
      warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
      warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
      2 warnings generated.
      gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c /var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmp64x28hgt.cpp -o var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmp64x28hgt.o -Wno-error=unused-command-line-argument-hard-error-in-future
      warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
      warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
      2 warnings generated.
      warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
      warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
      2 warnings generated.
      gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c /var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmp99_tg082.cpp -o var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmp99_tg082.o -Wno-error=unused-command-line-argument-hard-error-in-future
      warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
      warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
      2 warnings generated.
      warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
      warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
      2 warnings generated.
      gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c /var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpv4ct3en1.cpp -o var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpv4ct3en1.o -Wno-error=unused-command-line-argument-hard-error-in-future
      warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
      warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
      2 warnings generated.
      warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
      warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
      2 warnings generated.
      gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c /var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpcxsk3ylh.cpp -o var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpcxsk3ylh.o -Wno-error=unused-command-line-argument-hard-error-in-future
      warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
      warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
      2 warnings generated.
      warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
      warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
      2 warnings generated.
      gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c /var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpxeugvpxr.cpp -o var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpxeugvpxr.o -Wno-error=unused-command-line-argument-hard-error-in-future
      warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
      warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
      2 warnings generated.
      warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
      warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
      2 warnings generated.
      building 'osgeo._gdal' extension
      creating build/temp.macosx-10.6-intel-3.7
      creating build/temp.macosx-10.6-intel-3.7/extensions
      gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c extensions/gdal_wrap.cpp -o build/temp.macosx-10.6-intel-3.7/extensions/gdal_wrap.o -std=c++11 -Wno-error=unused-command-line-argument-hard-error-in-future -I/Library/Frameworks/GDAL.framework/Versions/2.4/Headers
      warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
      warning: include path for stdlibc++ headers not found; pass '-stdlib=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 &lt;stdexcept&gt;
               ^~~~~~~~~~~
      2 warnings and 1 error generated.
      error: command 'gcc' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-install-on9vchph/gdal/setup.py'"'"'; __file__='"'"'/private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-install-on9vchph/gdal/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-record-z5yq4g0d/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/gdal Check the logs for full command output
  </code></pre>