我正在尝试在linux机器上构建pybind11测试。我下载了源代码并执行了以下操作-
cd pybind11-master cd tests mkdir build cd build cmake ..
我得到了错误-`找不到由"pybind11“提供的具有以下任何名称的包配置文件:
pybind11Config.cmake pybind11-config.cmake
将安装前缀"pybind11“添加到CMAKE_PREFIX_PATH,或将"pybind11_DIR”设置为包含上述文件之一的目录。如果pybind11提供了单独的开发包或SGK,请确保已安装`
我遵循了这个链接- http://pybind11.readthedocs.io/en/master/basics.html,并按照“编译linux/mac的测试用例”一节中的说明进行了操作
我不确定该如何继续。任何指针都是有帮助的。
发布于 2020-07-28 22:49:48
在通过pip install pybind11
安装pybind11之后,我已经遇到了同样的问题。我会在这里发布我的解决方案,以防有人在这里结束。
我安装了following this link,一切正常,所需的文件也在那里。
基本上:
$ git clone https://github.com/pybind/pybind11.git
$ cd pybind11
$ mkdir build
$ cd build
$ cmake ..
$ make -j`nproc`
$ make check
$ make -j`nproc` install
https://stackoverflow.com/questions/46961942
复制相似问题