[CMake] FindPythonLibs on macOS

Marc CHEVRIER marc.chevrier at gmail.com
Fri Jun 22 05:32:03 EDT 2018


There is no specific reason.
But, starting with CMake 3.12, a new approach to manage python is available
(modules FindPython2, FindPython3 and FindPython) which take care of
consistency between interpreter and libraries and rely, when possible, on
python-config tool.



Le ven. 22 juin 2018 à 11:04, Jonas Devlieghere <jdevlieghere at apple.com> a
écrit :

> Hi everyone,
>
> I'm having trouble with FindPythonLibs on macOS when having a version of
> Python installed from either via python.org or Homebrew (in addition to
> the system one).
>
> The issue is that I end up with an inconsistency between the library and
> the interpreter, which causes issues at runtime.
>
> -- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version "2.7.10") <-
> System Python
> -- Found PythonInterp: /usr/local/bin/python2.7 (found version "2.7.15")
>      <- Homebrew Python
>
> I was wondering if there's a particular reason that FindPythonLibs doesn't
> use the python-config binary to find both the python libraries and
> interpreter.
>
> Cheers,
> Jonas
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180622/054c148e/attachment.html>


More information about the CMake mailing list