[CMake] Problems with FindPythonInterp
Yngve Inntjore Levinsen
yngve.levinsen at gmail.com
Fri Oct 7 04:32:23 EDT 2011
Dear all,
I have some configuration scripts in python that needs to be run for my
project, so I use the FindPythonInterp package. This has nicely found the
version 2.7 on my system so far, but now it suddenly finds /usr/bin/python
which is a soft link to version 3.2. My script doesn't work with python 3.
First: Is it possible to set a requirement that it should be python version 2?
Second: This for some weird reason only happens on my desktop, even though I
have pretty much exactly the same setup on my laptop. On my laptop it finds
/usr/bin/python2.7 (as it always has). They both have the same python versions
installed (2.7 and 3.2), and they both have the same cmake version installed
(2.8.6). I am running Arch Linux.
On my laptop:
-- Found PythonInterp: /usr/bin/python2.7
On my desktop:
-- Found PythonInterp: /usr/bin/python (found version "3.2.2")
I'm sure there must be some differences in what's installed on the two systems,
but I cannot figure out what.
I tried
find_package(PythonInterp 2.7 REQUIRED)
but that still found the 3.2 version and only commented that 2.7 was required.
Let me know if I can provide further information.
Cheers,
Yngve
More information about the CMake
mailing list