簡體   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