# CMake | find\_package(Python3) documentation confusion

**URL:** https://discourse.cmake.org/t/cmake-find-package-python3-documentation-confusion/15275
**Category:** Usage
**Created:** [October 28, 2025, 7:20pm UTC](https://discourse.cmake.org/t/cmake-find-package-python3-documentation-confusion/15275 "2025-10-28T19:20:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hjmjohnson](https://discourse.cmake.org/user_avatar/discourse.cmake.org/hjmjohnson/32/5874_2.png) [@hjmjohnson](https://discourse.cmake.org/u/hjmjohnson)
#### Post date: [October 28, 2025, 7:20pm UTC](https://discourse.cmake.org/t/cmake-find-package-python3-documentation-confusion/15275/1 "2025-10-28T19:20:16Z")

</div>

I’ve tried the following with cmake 3.28 (ubuntu 24.04) and 4.04 (mac arm).

I had expected to find libraries and include directories.

Could someone please explain why Python3\_Development.SABIModule\_FOUND is TRUE, but the associated variables are empty? There is probably a good reason for this, but the documentation is not clear about the behavior.

======

```auto
cmake_minimum_required(VERSION 3.26)

project(python_tester)

find_package(Python3 REQUIRED COMPONENTS Interpreter Development.SABIModule)
message(STATUS "Python3_Development.SABIModule_FOUND -> ${Python3_Development.SABIModule_FOUND}")
get_target_property(_sabi_path Python3::SABIModule LOCATION)
message(STATUS "Python3::SABIModule -> ${_sabi_path}")
message(STATUS "SABI libs: ${Python3_SABI_LIBRARIES}")
message(STATUS "SABI include dirs: ${Python3_SABI_INCLUDE_DIRS}")

```

=======

```auto
cmake .

```

```auto
-- Python3_Development.SABIModule_FOUND -> TRUE
-- Python3::SABIModule -> _sabi_path-NOTFOUND
-- SABI libs: 
-- SABI include dirs: 
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/johnsonhj/TESTER

```

---

<div class="post-metadata">

### Author: ![hjmjohnson](https://discourse.cmake.org/user_avatar/discourse.cmake.org/hjmjohnson/32/5874_2.png) [@hjmjohnson](https://discourse.cmake.org/u/hjmjohnson)
#### Post date: [October 28, 2025, 7:20pm UTC](https://discourse.cmake.org/t/cmake-find-package-python3-documentation-confusion/15275/2 "2025-10-28T19:20:51Z")

</div>

[Marc Chevrier](https://gitlab.kitware.com/marc.chevrier "https://gitlab.kitware.com/marc.chevrier") [commented](https://gitlab.kitware.com/cmake/cmake/-/issues/27338#note_1720790 "https://gitlab.kitware.com/cmake/cmake/-/issues/27338#note\_1720790"):

The real artifacts defined by a component depends on the platform.  
If you are on `Linux` or `macOS`, the libraries are not required for the development using the Python Stable ABI. This explains why the `Python3_SABI_LIBRARIES` variable is empty, as well as the `LOCATION`target property. Only the include directories are defined by the variable `Python3_INCLUDE_DIRS` and the `INTERFACE_INCLUDE_DIRECTORIES`target property.  
By the way, the variable `Python3_SABI_INCLUDE_DIRS` is never defined by the `Python3` module.

In practice, if you are relying on the targets defined by the `Python3` module as well as the `python3_add_library()` command, you don’t have to worry about the variables…

And to finish, it is assumed that the developers using this module are a minimum aware of what are the constraints and usages regarding python developments. This is not the role of the documentation of the `Python3`module to provide such development details.

---

<div class="post-metadata">

### Author: ![hjmjohnson](https://discourse.cmake.org/user_avatar/discourse.cmake.org/hjmjohnson/32/5874_2.png) [@hjmjohnson](https://discourse.cmake.org/u/hjmjohnson)
#### Post date: [October 28, 2025, 7:22pm UTC](https://discourse.cmake.org/t/cmake-find-package-python3-documentation-confusion/15275/3 "2025-10-28T19:22:42Z")

</div>

I was aware that the Python3\_SABI\_LIBRARIES are not needed on Linux and macOS. I had expected them to be the same as Python3\_LIBRARIES. The most confusing part was that

_Python3\_Development.SABIModule\_FOUND → TRUE_

but all the other \*SABI\* variables were empty.
