<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">Hi,<br />
<br />
To help to you to understand this behaviour:<br />
Package `FindPython3` search strategy is to look at first at versioned artefacts, starting from the most recent version.<br />
And hone you specify multiple components, you are ensured of the consistency between various artefacts searched.<br />
<br />
So, for the interpreter, `python3.9’ will be searched first, after ‘python3.8’, etc… When multiple versions are installed, the most recent version of the interpreter is selected. And, after, only ‘Development’ artefacts matching this version will be searched for.<br />
<br />
To handling this situation, a new hint (<a href="https://cmake.org/cmake/help/git-master/release/dev/FindPython-FIND_UNVERSIONED_NAMES.html" target="_blank">https://cmake.org/cmake/help/git-master/release/dev/FindPython-FIND_UNVERSIONED_NAMES.html</a>) has been introduced in version 3.20 (currently in development) of CMake.<br />
<br />
As a work-around, you can specify a specific version: find_package(Python3 3.7 EXACT …)<br />
<br />
Or, starting with version 3.19 of CMake, specifying a range, which is more flexible: find_package(Python3 3.1…<3.8 …)<br />
<br />
Marc</div>
</div>
</body>
</html>