[CMake] Python version specification in FindPythonInterp is ignored

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


Apologies to all. It worked OK after I blew away the cache.

From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Ateljevich, Eli
Sent: Monday, June 25, 2012 1:40 PM
To: cmake at cmake.org
Subject: [CMake] Python version specification in FindPythonInterp is ignored

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/47916695/attachment.htm>


More information about the CMake mailing list