Can't find Python.h anywhere on Mac

I am trying to embed a python file that uses a python library in c, to do this I need to include python.h but I don't see it anywhere on my mac. Right now when I try to compile I just get a missing Python.h compile error. I tried using the search bar to find it in /usr and /library. Neither had the file.

I tried doing #include <Python/python.h> and that doesn't change anything.

Is trying to setup a virtual env the issue?

Actually I installed a venv, I have: project_env |_bin |_include |_lib and python.h is nowhere in any of these folders

The macOS SDK does not include Python headers and libraries [1]. If you need those, you should install them yourself, just like you would any other third-party SDK. I can’t help with you that aspect of this. If you get stuck, I recommend that you look at Python’s support channel (if you search the ’net for Using Python on a Mac you’ll find their official info).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Historically it did, but that time has long past. Also, Xcode includes a copy of Python internally, but that’s considered an implementation detail.

Can't find Python.h anywhere on Mac
 
 
Q