Skip to content

FindPython3 not working correctly.

I have two Python versions installed, 3.10.9 and 3.11.1.

The default for python or python3 is 3.10.9. For cmake > 3.20 the cmake tests find the 3.11.1 version leading to import errors later on. The old backport (used when cmake < 3.20) finds the Python version correctly. Is there a way to make the new cmake test behave correctly?

Seems like I can solve the problem by manually specifying

-DPython3_EXECUTABLE=/usr/bin/python

But it's strange that this is not the first pick for the cmake test.

Edited by Robert K