Skip to content

[BUG]: Unknown CMake command "python3_add_library" with Python 3.14t (Free Threaded) #5806

@Laky-64

Description

@Laky-64

Required prerequisites

What version (or hash if on master) of pybind11 are you using?

stable (3.0.0)

Problem description

Hi!

I'm trying to use pybind11 with Python 3.14t (Free Threaded), using the official manylinux Docker images, but I'm running into the following issue:

Unknown CMake command "python3_add_library"

It works fine with all other Python versions, including the standard Python 3.14, but not with the free-threaded edition.

In my CMakeLists.txt I'm finding Python like this:

find_package(Python3 REQUIRED COMPONENTS Interpreter)

And I'm passing the Python executable from my setup.py, as seen here:
https://github.com/pytgcalls/ntgcalls/blob/master/setup.py#L79

Any idea why this issue happens specifically with Python 3.14t?

Thanks!

Is this a regression? Put the last known working version here if it is.

Not a regression

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNew bug, unverified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions