pitone e python3 sono installati in OS X Yosemite via Homebrew, ma non riesce a trovare CMake PythonLibs 3, solo 2:OS X CMake non riesce a trovare PythonLibs 3.4
CMakeLists.txt:
set(Python_ADDITIONAL_VERSIONS 3.4)
FIND_PACKAGE(PythonInterp REQUIRED)
FIND_PACKAGE(PythonLibs 3.4 REQUIRED)
get:
-- Found PythonInterp: /usr/local/bin/python3.4 (found suitable version "3.4.3", minimum required is "3.4")
-- Found PythonLibs: /usr/lib/libpython3.4.dylib (found version "2.7.6"
CMakeLi sts.txt:
set(Python_ADDITIONAL_VERSIONS 3.4)
FIND_PACKAGE(PythonInterp 3.4 REQUIRED)
FIND_PACKAGE(PythonLibs 3.4 REQUIRED)
get:
Could NOT find PythonLibs: Found unsuitable version "2.7.6", but required
is at least "3.4" (found PYTHON_LIBRARY-NOTFOUND)
Poi ho aggiunto questo per cmake liste:
INCLUDE_DIRECTORIES(/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib)
INCLUDE_DIRECTORIES(/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/include/python3.4m)
e perfino copiati che le directory da /usr/lib
, e poi ottenuto:
Could NOT find PythonLibs: Found unsuitable version "2.7.6", but required
is at least "3.4" (found /usr/lib/libpython3.4.dylib)
che sembra strano.
stesso problema con CMake su Windows, appositamente questa linea è un messaggio di errore stupido: '(trovato versione adatta "3.4 .3 ", minimo richiesto è" 3.4 ")' – dashesy