Menu

#574 Numpy detection by cmake fails if python3 is the default

v1.0 (example)
closed
nobody
None
5
2018-04-08
2013-10-31
No

On systems where /usr/bin/python is python3 (Manjaro, Arch), the FindNumpy.cmake script fails to work even if python3-numpy is installed because of a syntax error in the inline python call:

python -c 'import numpy; print numpy.get_include()'

This appears to use a syntax that is no longer supported (sorry I'm not a python programmer).

A temporary work-around is to force the use of python2 by using "-DPYTHON_EXECUTABLE=/usr/bin/python2" in the cmake command line.

Actually there may be other python 2/3 issues as cmake was also detecting the python3 executable and the python2 libraries.

Discussion

  • Sylwester Arabas

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB