[CMake] cmake vs. Python 3.4

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


>
> Try using the update-alternatives command so that "python" becomes
> symbolically linked to python-3.4 rather than python-2.7.9
>
> Or uninstall python 2.7.9.
>

The standard Python distribution for versions 3 or greater installs a
binary called `python3`, not `python`.  That is the standard.  If you are
running Python3 from a binary called `python`, that is not standard.  I
know that distros do this (or can do it with tweaking); but that doesn't
make it standard.  If you want to be sure you're getting Python3, you
should look for a binary called `python3`.

Does FindPython not have logic to check the versioned pythonx.y
> alternatives when doing these checks?  Why isn't it checking the python3
> and python3.x commands in this circumstance?


Have you tried the FindPython I referenced above?  It would solve the
problems you brought to this thread (and maybe even some you didn't yet
know you have).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161223/22b6ea59/attachment.html>


More information about the CMake mailing list