Hello,
I’m trying to compile ROOT, on a CentOs machine, to run pyroot on python3. I already did the same operation on other distros in the past with no problem.
When i try to do:
cmake -DPYTHON_EXECUTABLE=/usr/bin/python3.6 ../root-6.18.04/
I get:
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.8")
-- Found PythonLibs: /usr/lib64/libpython2.7.so (found version "2.7.5")
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:444 (message):
Version mismatch between Python interpreter (3.6.8) and libraries (2.7.5).
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):-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.8")
-- Found PythonLibs: /usr/lib64/libpython3.6m.so.1.0 (found version "2.7.5")
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:444 (message):
Version mismatch between Python interpreter (3.6.8) and libraries (2.7.5).
CMakeLists.txt:159 (include)
No problem, dear CMake, I can specify also the pythonlibs path -If i try:
cmake -DPYTHON_EXECUTABLE=/usr/bin/python3.6 -DPYTHON_LIBRARY=/usr/lib64/libpython3.6m.so.1.0 ../root-6.18.04/'
The result is:
-- Looking for python
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.8")
-- Found PythonLibs: /usr/lib64/libpython3.6m.so.1.0 (found version "2.7.5")
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:444 (message):
Version mismatch between Python interpreter (3.6.8) and libraries (2.7.5).
Which is quite nonsense for me…
If I try to specify also the header location:
cmake -Dpython=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_LIBRARY=/usr/lib64/libpython3.6m.so.1.0 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m/ ../root-6.18.04/'
Maybe it’s worst:
-- Found PythonInterp: /usr/bin/python3 (found version "3.6.8")
-- Found PythonLibs: /usr/lib64/libpython3.6m.so.1.0
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:444 (message):
Version mismatch between Python interpreter (3.6.8) and libraries ().
I removed “CMakeCache.txt” at every step.
I’m out of ideas, can someone help me?
Thanks,
Alberto