繁体   English   中英

在 MacBook Pro 上使用 pybind11

[英]using pybind11 on MacBook Pro

我正在尝试在 Macbook 上使用 pybind11,我正在尝试按照https://pybind11.readthedocs.io/en/stable/basics.html中所写的方式进行操作

mkdir build
cd build

但是当我尝试

cmake .. 

我有一个错误

CMake Error: The source directory "/Users/fai" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

我怎样才能解决这个问题? 我想在我的 Mac 上使用 pybind11,看来我需要解决这个问题

在我写的 Xcode 中使用 pybind11 时,我也遇到了问题

#include <pybind11/embed.h>

但我有一个错误

'pybind11/embed.h' file not found

我根据那里的网站正确安装了pybind11

您可以将以下行添加到 CMakeLists.txt

# set pybind11 dir
set(pybind11_DIR /Users/Caleb/Softwares/pybind11)
find_package(pybind11 REQUIRED)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM