Skip to content

Issue installing Python bindings with bundled version of pybind11 #473

@bunburya

Description

@bunburya

I was having issues installing the Python bindings on ArchLinux using Python 3.12 (using pip install .). The output is long but this seems to be the pertinent issue:

      In file included from /home/alan/bergamot-translator/3rd_party/pybind11/include/pybind11/cast.h:16,
                       from /home/alan/bergamot-translator/3rd_party/pybind11/include/pybind11/attr.h:13,
                       from /home/alan/bergamot-translator/3rd_party/pybind11/include/pybind11/pybind11.h:13,
                       from /home/alan/bergamot-translator/3rd_party/pybind11/include/pybind11/iostream.h:22,
                       from /home/alan/bergamot-translator/bindings/python/bergamot.cpp:1:
      /home/alan/bergamot-translator/3rd_party/pybind11/include/pybind11/detail/type_caster_base.h: In function ‘std::string pybind11::detail::error_string()’:
      /home/alan/bergamot-translator/3rd_party/pybind11/include/pybind11/detail/type_caster_base.h:482:26: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
        482 |             frame = frame->f_back;
            |                          ^~

Using my current system version of pybind11 (2.13.5) fixes the issue. I also tested installation with v2.13.5 in Python 3.10 and 3.8 and it works as well. So I would suggest shipping with that version.

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