[CMake] Python version specification in FindPythonInterp is ignored

Ateljevich, Eli eli at water.ca.gov
Mon Jun 25 16:39:50 EDT 2012


Hi,
I am working with cmake 2.6 but have grabbed FindPythonInterp.cmake and its dependencies from 2.8.8. From what I can tell, this version is touted as having resolved most issues with specifying the python version.

Our OS has a python 2.4 called "python" installed in /usr/bin. There is another python 2.7 also called "python" we all load from the local module system. The 2.7 version is ahead of the 2.4 on path ... I have verified that the command line "which python" gives the path to the 2.7 version.

FindPythonInterp seems to find the 2.4 version no matter what I write. If I write: find_package(PythonInterp 2.7 REQUIRED) cmake will realize this is wrong and indicate an error, but it doesn't keep looking. I am trying to come up to speed, but I can't quite make out from the script what hint I might need to supply for FindPythonInterp.cmake to find the 2.7 version.  Can anyone help me out?

Thanks,
Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120625/1fbe8231/attachment.htm>


More information about the CMake mailing list