# Python\_SOABI should match version of find\_package(Python3 VERSION)

**URL:** <https://discourse.cmake.org/t/python-soabi-should-match-version-of-find-package-python3-version/14452>\
**Category:** Code\
**Created:** [July 28, 2025, 6:54am UTC](https://discourse.cmake.org/t/python-soabi-should-match-version-of-find-package-python3-version/14452 "2025-07-28T06:54:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fabian\_schutze](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fabian_schutze/32/5486_2.png) [@fabian\_schutze](https://discourse.cmake.org/u/fabian_schutze)\
**Post date:** [July 28, 2025, 6:54am UTC](https://discourse.cmake.org/t/python-soabi-should-match-version-of-find-package-python3-version/14452/1 "2025-07-28T06:54:13Z")

</div>

The following CMake statement:

```auto
find_package(Python3 3.11 EXACT COMPONENTS Development Interpreter REQUIRED)
message("The extension suffix is: ${Python_SOABI}")

```

Produces:

```auto
The extension suffix is: cpython-312-x86_64-linux-gnu

```

The [docs](https://cmake.org/cmake/help/latest/module/FindPython.html) say about Python\_SOABI:

> Python\_SOABI

```
Added in version 3.17.

Extension suffix for modules.

Information computed from sysconfig.get_config_var('EXT_SUFFIX') or sysconfig.get_config_var('SOABI') or python3-config --extension-suffix.

```

The SOABI is indeed was I get when I type `python3-config --extension-suffix` in my terminal:

```auto
python3-config --extension-suffix
.cpython-312-x86_64-linux-gnu.so

```

I requested a different version however from find\_package. Could the version obtained from find\_package somehow be correlated with the SOABI version?

---

<div class="post-metadata">

**Author:** ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)\
**Post date:** [July 28, 2025, 9:25am UTC](https://discourse.cmake.org/t/python-soabi-should-match-version-of-find-package-python3-version/14452/2 "2025-07-28T09:25:42Z")

</div>

Very strange behavior for the following reason: When the `Interpreter` component is specified, the `python-config` tool is not used because various information are retrieved from the Python interpreter itself (as described in the doc: `sysconfig` package is used).

Moreover, the description of the `SOABI` computation is a simplification of the real algorithm: when the `python-config` tool is involved, the exact version is used (for example `python3.11-config`), and fallback to `python3-config` if not available.

And to finish, I am not able to reproduce your problem. I suspect an erroneous configuration of the various python versions…
