4

I'm trying to build pybind11 tests on a linux box. I downloaded the source and do the following -

cd pybind11-master cd tests mkdir build cd build cmake ..

I get the errors - ` Could not find a package configuration file provided by "pybind11" with any of the following names:

pybind11Config.cmake pybind11-config.cmake

Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set "pybind11_DIR" to a directory containing one of the above files. If "pybind11" provides a separate development package or SGK, be sure it has been installed `

I followed this link - http://pybind11.readthedocs.io/en/master/basics.html and did as per the instruction in section 'Compiling Test Cases for linux/mac'

I am not sure how to proceed. Any pointers are helpful.

1
  • I hit the same problem, after installed pybind11 and tried to use it in cmake. Commented Nov 16, 2018 at 3:25

1 Answer 1

2

I already hit the same problem after installing pybind11 by pip install pybind11. I'll post here my solution in case someone ends up here.

I installed following this link, everything went ok, and the file needed was there.

Basically:

$ git clone https://github.com/pybind/pybind11.git

$ cd pybind11

$ mkdir build

$ cd build

$ cmake .. 

$ make -j`nproc`

$ make check

$ make -j`nproc` install
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.