I'm trying to install tbb on MacOS using Homebrew, and I get the following error message:
==> cmake --build build/shared
Last 15 lines from /Users/inspectorgloomy/Library/Logs/Homebrew/tbb/02.cmake:
/Library/Developer/CommandLineTools/usr/bin/make -f python/CMakeFiles/python_build.dir/build.make python/CMakeFiles/python_build.dir/build
[100%] Build and install to work directory the oneTBB Python module
cd /tmp/tbb-20240201-34715-juqzow/oneTBB-2021.11.0/build/shared/python && /usr/local/bin/python3 python_build/setup.py build -bpython_build build_ext -I/tmp/tbb-20240201-34715-juqzow/oneTBB-2021.11.0/src/tbb/../../include -L/tmp/tbb-20240201-34715-juqzow/oneTBB-2021.11.0/build/shared/appleclang_13.0_cxx11_64_release install --prefix build --install-lib python_build/build/lib/python3.12/site-packages -f
tbb/api_wrap.cpp:199:11: fatal error: 'Python.h' file not found
# include <Python.h>
^~~~~~~~~~
1 error generated.
Environment specifies CC=clang CXX=clang++
Warning: TBBROOT env var is not set and Intel's compiler is not used. It might lead
!!!: to compile/link problems. Source tbbvars.sh/.csh file to set environment
error: command '/usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang' failed with exit code 1
make[2]: *** [python/CMakeFiles/python_build] Error 1
make[1]: *** [python/CMakeFiles/python_build.dir/all] Error 2
make: *** [all] Error 2
It looks like CMake can't find Python.h for some reason. I can build other packages just fine, it only happens with tbb. I have Python installed.
For context, I'm trying to install tbb in order to install openvino. I'm running MacOS 11.7.10.
Based on a similar question posted as an issue in a repository, it looks like this is looking for something XCode provides; another StackOverflow question has an answer saying something similar. Ensure you have XCode's latest version installed via the App Store, and it might not hurt to also try getting Python's dev packages also (as the StackOverflow question linked has an answer mentioning).