Hello,
I’m trying to achieve both options, starting from building ROOT with py3.7. I take the interpreter from the installation directory related to TLJH, in order to match the exact version. The message I get when I try to run
cmake -DCMAKE_INSTALL_PREFIX=../installdir -DPYTHON_EXECUTABLE=/opt/tljh/user/bin/python3.7 ../root_src
Citing this thread, I also tried to add the option -DPYTHON_LIBRARY=/opt/tljh/user/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.a
and I get the following message:
-- Detected ROOT_VERSION 6.22.99
-- Looking for Python
-- Found PythonLibs: /opt/tljh/user/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.a (found version "3.6.9")
CMake Error at cmake/modules/SearchRootCoreDeps.cmake:230 (message):
Version mismatch between Python interpreter (3.7.3) and libraries (3.6.9).
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:129 (include)
-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/builddir/CMakeFiles/CMakeOutput.log".
Moreover, no file of the type libpython3.7.so is present.