[CMake] PythonInterp and PythonLibs find different versions on Apple

Burlen Loring burlen.loring at gmail.com
Wed Dec 30 21:21:46 EST 2015


After digging though a number of closed bug reports I found an open 
issue in mantis that describes the problem exactly and has a number of 
proposed solution. I took one of them(c39236) and this seems to do the 
trick.

https://cmake.org/Bug/view.php?id=14809

On 12/23/2015 08:54 AM, Burlen Loring wrote:
> Hi,
>
> I'm having this issue that cmake using version 3.3.0. Python detection 
> is finding different versions of interpreter and libraries. There are 
> two version of Python installed, system one and homebrew one. cmake 
> finds Interpreter from homebrew while libs are from system install.
>
> Here's my CmakeLists
>
>     find_package(PythonInterp)
>     find_package(PythonLibs)
>
> and configure output
>
>     -- Found PythonInterp: /usr/local/bin/python (found version "2.7.11")
>     -- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version
>     "2.7.10")
>
> I also tried
>
>     find_package(PythonInterp)
>     find_package(PythonLibs ${PYTHON_VERSION_STRING})
>
> but got
>
>     -- Found PythonInterp: /usr/local/bin/python (found version "2.7.11")
>     -- Could NOT find PythonLibs: Found unsuitable version "2.7.10",
>     but required is at least "2.7.11" (found /usr/lib/libpython2.7.dylib)
>
> I suppose I can just over ride these manually, but shouldn't this just 
> work? or am I doing it wrong?
>
> Burlen
>
> ps.
>
> I tried to install cmake 3.4 on my system but bootstrap has a compile 
> error.
>
> I observed the same with cmake 3.4.1 on a colleagues Apple system that 
> has system Python plus Annaconda Python. This leads me to think that 
> it's not addressed in 3.4.1.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20151230/07802c87/attachment.html>


More information about the CMake mailing list