I am using the python version for macports on a Snow Leopard computer and using cmake to create a cross-platform extension. I am looking for a python interpreter and libraries in the system using the following commands in CMakeLists.txt
include(FindPythonInterp) include(FindPythonLibs )
However, while cmake identified the correct interpreter in /opt/local/bin , it tries to associate with the wrong structure, namely the Python system.
-- Found PythonInterp: /opt/local/bin/python2.6 -- Found PythonLibs: -framework Python
And this leads to the following runtime error
Fatal Python error: Interpreter not initialized (version mismatch?)
Once I replaced -framework Python with /opt/local/Library/Frameworks/Python.framework/Python , it looks like the job is working properly.
How can I make a cmake link against the correct Python structure found in
/opt/local/Library/Frameworks/Python.framework/Python
not system in
/System/Library/Frameworks/Python.framework/Python
?
python frameworks cmake macports macos
jailil
source share