[CMake] Fwd: cmake vs. Python 3.4

Elizabeth A. Fischer elizabeth.fischer at columbia.edu
Fri Dec 23 16:45:42 EST 2016


Ooops, this message was supposed to be "Reply All"

---------- Forwarded message ----------
From: Elizabeth A. Fischer <elizabeth.fischer at columbia.edu>
Date: Fri, Dec 23, 2016 at 3:28 PM
Subject: Re: [CMake] cmake vs. Python 3.4
To: Lev <leventelist at gmail.com>


Look for a binary called `python3`, not `python`.  See here:

https://github.com/citibeth/icebin/blob/develop/cmake/FindPython.cmake

The `FindPython.cmake` I shared above also queries the Python system for
the correct place to install things.  See here for how it's used:

https://github.com/citibeth/icebin/blob/develop/pylib/CMakeLists.txt


On Fri, Dec 23, 2016 at 2:57 PM, Lev <leventelist at gmail.com> wrote:

> Hi list,
>
>
> I have this:
>
> FIND_PACKAGE(PythonInterp)
>
> and cmake finds this:
>
> -- Found PythonInterp: /usr/bin/python (found version "2.7.9")
>
> However, 3.4 is also installed. How can I specify to find 3.4?
>
> If I say:
>
> set(Python_ADDITIONAL_VERSIONS 3.4)
> FIND_PACKAGE(PythonInterp 3 REQUIRED)
>
> still no luck.
>
> This is on a Debian stable, so
>
> $ cmake --version
> cmake version 3.0.2
>
>
> Thanks,
> Levente
>
> --
> 73 de HA5OGL
> Op.: Levente
> --
>
> 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/opensou
> rce/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161223/a10044cd/attachment.html>


More information about the CMake mailing list