Python version mixup.
When recently switching to python 3.6 I stumbled upon the following problem:
-- Found PythonInterp: /usr/bin/python3.6 (found suitable version "3.6.5", minimum required is "3.6") -- Found PythonLibs: /usr/lib/libpython3.5m.so (found version "3.5.5")
The libs don't match the version of the interpreter. This could in my case be fixed by switching the order in DunePythonCommonMacros.cmake:
set(Python_ADDITIONAL_VERSIONS 3.7 3.6 3.5 3.4)
Before it was starting from 3.4. This may not be the proper fix though.
Edited by Robert K