GDAL Installation on Mac (Ventura) with Python 3.11 via Homebrew Fails: 'Python.h' File Not Found

124 Views Asked by At

Description

I'm attempting to install GDAL on a Mac running Ventura OS using Python 3.11 in PyCharm. I'm using Homebrew for the installation but am encountering the following error:

extensions/osr_wrap.cpp:180:11: fatal error: 'Python.h' file not found
#include <Python.h>
          ^~~~~~~~~~
error: command '/usr/bin/clang' failed with exit code 1
[end of output]

The installation fails with a message indicating that the 'Python.h' file was not found.

What I've Tried

  1. Ensured that Xcode and the Xcode Command Line Tools are installed.
  2. Attempted to manually install the Python header files.
  3. Also tried using different versions of GDAL and Python.

Question

Does anyone have a solution or workaround for this issue? Any assistance is welcome.

Additional Information

  • Operating System: Mac Ventura
  • Python Version: 3.11
  • Installation Method: Homebrew
  • Development Environment: PyCharm
0

There are 0 best solutions below