最近我在ubuntu 18.04上进行了更新,我发现python是从2.7.13更新的(ubuntu安装后由apt-get install python
安装),如果现在执行此操作,我将获得2.7.15 )。但是,当我为cern ROOT软件进行cmake配置时,我得到:
-- Looking for python
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:480 (message):
Version mismatch between Python interpreter (2.7.15) and libraries
(2.7.13).
ROOT cannot work with this configuration. Please specify only
PYTHON_EXECUTABLE to CMake with an absolute path to ensure matching
versions are found.
我尝试过:cmake -DPYTHON_LIBRARY = $(python-config --prefix)/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR = $(python-config --prefix)/include/python2.7 结果表明:
-- Looking for python
-- Found PythonLibs: /lib/libpython2.7.dylib
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:480 (message):
Version mismatch between Python interpreter (2.7.15) and libraries ().
ROOT cannot work with this configuration. Please specify only
PYTHON_EXECUTABLE to CMake with an absolute path to ensure matching
versions are found.
Call Stack (most recent call first):
CMakeLists.txt:150 (include)
-- Configuring incomplete, errors occurred!
我认为这应该是python-2.7.15不匹配导致的问题 解释器和python-2.7.13库。我想知道如何通过将python库设为2.7.15或将解释器设为2.7.13来解决该问题?