使用自制程序在 MacOS 上安装 tbb 时出错

问题描述 投票:0回答:1

我尝试使用 Homebrew 在 MacOS 上安装 tbb,但收到以下错误消息:

==> 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

看起来 CMake 由于某种原因找不到 Python.h。我可以很好地构建其他包,这只发生在 tbb 上。我已经安装了Python。

对于上下文,我正在尝试安装 tbb 以便安装 openvino。我运行的是 MacOS 11.7.10。

python macos cmake homebrew tbb
1个回答
0
投票

基于存储库中作为问题发布的类似问题,看起来这是在寻找 XCode 提供的东西; 另一个 StackOverflow 问题有一个答案 说了类似的话。确保您已经通过 App Store 安装了 XCode 的最新版本,并且尝试获取 Python 的开发包也可能不会有什么坏处(因为链接的 StackOverflow 问题有一个答案提到)。

© www.soinside.com 2019 - 2024. All rights reserved.