Skip to content

couldnt find pybind11Config.cmake #1379

Closed
@theonesud

Description

@theonesud

I have installed pybind using pip install pybind11 and using python 3.6 and cmake 3.5.

CMakeLists.txt:

cmake_minimum_required (VERSION 3.5)
project(dummy_proj)
find_package(pybind11 REQUIRED)
pybind11_add_module(test test.cpp)

Running cmake . gives an error:

CMake Error at CMakeLists.txt:4 (find_package):
By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "pybind11",
but CMake did not find one.

  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 SDK, be sure it has
  been installed.

Can anyone tell me how to complie it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions