首页 > 解决方案 > Cmake在构建openpose库时在配置过程中抛出“BUILD PYTHON”错误

问题描述

我对 cmake 很陌生,我正在使用 Cmake Gui 来编译 openpose 库https://github.com/CMU-Perceptual-Computing-Lab/openpose。我正在Mac机器上尝试这个。

现在,在 Cmake-GUI 中:

  1. 将 BUILD PYTHON 标志设置为 OFF。配置 n 代有效!
  2. 但是,将 BUILD PYTHON 标志设置为 ON。配置报错[下贴],虽然生成也可以,但最终编译报python的错误。

我需要使用这个 Python API。任何帮助,将不胜感激!

我猜pybind11有问题。已尝试删除pybind11文件夹并做了git clonepybind11; git init完毕。

Building CPU Only.
Found gflags  (include: /usr/local/include, library: /usr/local/lib/libgflags.dylib)
Found glog    (include: /usr/local/include, library: /usr/local/lib/libglog.dylib)
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) 
Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) 
Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) 
${Caffe_INCLUDE_DIRS} set by the user to /usr/local/include/caffe
${Caffe_LIBS} set by the user to /usr/local/lib/libcaffe.dylib
Download the models.
Downloading BODY_25 model...
Model already exists.
Downloading body (COCO) model...
Model already exists.
Downloading body (MPI) model...
Model already exists.
Downloading face model...
Model already exists.
Downloading hand model...
Model already exists.
Models Downloaded.
fatal: not a git repository (or any of the parent directories): .git

pybind11 v2.3.dev0
Configuring done

标签: pythonmacoscmakeopenpose

解决方案


推荐阅读