Skip to content

Build fails - fatal error: Python.h: No such file or directory with pybind11 #34

Description

@Chewbakka-Wakka

I have these installed:

BuildRequires: boost-devel
BuildRequires: boost-python
BuildRequires: boost-system
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: lzip
BuildRequires: python3dist(pybind11)
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(setuptools)

Error shown:
{
In file included from /usr/lib/python3.9/site-packages/pybind11/include/pybind11/detail/../attr.h:13,
from /usr/lib/python3.9/site-packages/pybind11/include/pybind11/detail/class.h:12,
from /usr/lib/python3.9/site-packages/pybind11/include/pybind11/pybind11.h:13,
from python-bindings/chiabip158.cpp:15:
/usr/lib/python3.9/site-packages/pybind11/include/pybind11/detail/../detail/common.h:274:10: fatal error: Python.h: No such file or directory
274 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
}

Is their a specific way to build this in terms of should gcc be used or python build with PEP517 package builder for this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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