FindPython3 finds XCode's python interpreter on macOS
Xcode installs a /usr/bin/python3
as an xcselect
tool. FindPython3
ends up finding it and then not finding the headers. This makes sense as they are actually located by the real Python3's framework. The path to the real place is:
xcode_binloc="$( xcrun -f python3 )"
framework_binloc="$( readlink -f "$xcode_binloc" )"
That path can then be used to find the full framework that ships with Xcode.
Cc: @marc.chevrier
Edited by Ben Boeckel