I have fresh CentOS 8 with an installed Python 3.6.8 in /usr/bin/.
I wanted to install ROOT (pyROOT). But it can’t find python libraries and results following error:
[foxwise@foxwise build_root]$ cmake -DCMAKE_PREFIX_INSTALL=/home/foxwise/Software/root-6.20.04 ../root-6.20.04/
-- Looking for python
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
(Required is at least version "3")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindPythonLibs.cmake:261 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
cmake/modules/SearchRootCoreDeps.cmake:87 (find_package)
CMakeLists.txt:120 (include)
-- Configuring incomplete, errors occurred!
See also "/home/foxwise/Downloads/build_root/CMakeFiles/CMakeOutput.log".
I have tried put the flag -DPYTHON_LIBRARY=/usr/lib64
. Libraries are there, I’ve checked
It doesn’t help. It shows different error asking to specify only EXECUTABLE flag:
-- Looking for python
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.8")
-- Found PythonLibs: /usr/lib64
CMake Error at cmake/modules/SearchRootCoreDeps.cmake:90 (message):
Version mismatch between Python interpreter (3.6.8) 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:120 (include)
So I have tried to provide only EXECUTABLE flag. It results in another error similar to the first one, but identifying python as “version 1.4”.
-- Found PythonInterp: /usr/bin (found version "1.4")
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindPythonLibs.cmake:261 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
cmake/modules/SearchRootCoreDeps.cmake:87 (find_package)
CMakeLists.txt:120 (include)
There are a lot of 3+ years old threads that propose
-Dpython=ON
-Dpython3=ON
-Dpython_version=3
flags to turn on/off, etc.
I have tried to play around them, but also no results.
I have also tried to install it with compiled python 3.8.3 but failed.
Previously I succeed to install ROOT 6.18/00 with a compiled python3 3.7+ twice.
If I remember correctly it was with both -Dpython=ON -DPYTHON_EXECUTABLE
flags on.
I am wondering that trying to do the same for the 3rd time I can’t install it properly and spent whole day already.
What am I missing?
Could it be fixed in the future? It would be so nice to see ROOT working with not problems with python.
thanks for your time,
Bohdan
__
_ROOT Version: 6.20/04
_Platform: CentOS 8
_Compiler: g++ (GCC) 8.3.1 20190507
_Python: 3.6.8 and 3.8.3
_CMake: 3.11.4
_