Cannot build 6.20/04 without python-dev

Hi Axel,

Thanks for the announce. Sadly, I didn’t manage to build ROOT v6.20/02 and /04 without PythonLibs. ROOT v6.20/00 is however successfully built by

cmake -D python=OFF [path-to-root-source]

But it’s not for /02 as well as /04 subversions:

$ cmake -D python=OFF ~/src/root
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.26.0") 
-- Looking for python
-- Found PythonInterp: /home/telzhov/.pyenv/shims/python (found version "3.7.5") 
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindPythonLibs.cmake:262 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/modules/SearchRootCoreDeps.cmake:87 (find_package)
  CMakeLists.txt:120 (include)

-- Configuring incomplete, errors occurred!
See also "/home/telzhov/opt/_/CMakeFiles/CMakeOutput.log".

As far as I understand, PythonLibs are not required yet by ROOT, correct?

Thank you!


Try with: -Dpyroot=OFF -Dpyroot_experimental=OFF

Tried (both with -D python=OFF appended and without), with exactly the same result.

I have also tried to use ccmake (ncurses UI to cmake) instead of plain cmake. The first screenshot is what I got after running

ccmake ~/src/root and pressing ‘c’ (configure)

(checked it out to v6-20-00). Then I removed everything, checked out ROOT repo to the latest v6-20-04, and repeated what I’ve just typed above. The second screenshot is what I got after that. So it seems to be something wrong with the latest version – I just don’t have any options to switch them ON or OFF.

UPD also attached two CMakeCache’s, the results after running “cmake ~/src/root” for each ROOT version. Sizes are 44K vs 14K:

CMakeCache-v6-20-00.txt (43.9 KB)
CMakeCache-v6-20-04.txt (13.5 KB)



Here I have install this new release on my Ubuntu machine. And I’m doing work with this new release. Thanks for your support and update to me. Here, I have attach some images about the root and pyroot.


Mr. Muhammad Farooq


I believe that it builds if you have PythonLibs installed. But I don’t need pyroot, and that’s okay for v6-20-00 – it builds successfully without PythonLibs. ROOT v6-20-02/04 seems to require PythonLibs to be installed, and I’m not sure that this is correct.


Thanks for your report, @telzhov . I have moved this into a dedicated topic.

@etejedor could you see whether you can reproduce this?

Cheers, Axel.


Here first you have to install the Build Prerequisites for the different platform here is also the python-dev from this link:

then install the pyroot using pip install jupyter metakernel


Mr. Muhammad Farooq

I don’t have to install python-devel – it’s listed under ‘Most common optional packages’ section. This is the problem: the python-devel package should not be required by ROOT.

And I agree it’s a problem :slight_smile: and I’m hoping for @etejedor to take look tomorrow!

Cheers, Axel

@telzhov Thank you for the report and feedback! We realized that requirement of python-dev was not mentioned in release notes. There is opened PR fixing this issue.

The reason why it is required, it is because it was a crucial bug fix between 6.20.00 and 6.20.02 connected with new features introduced in pyroot in 6.20.00.

(cc: @Axel @etejedor)

I forgot to mention that we will update as well

It’s good to update the prerequisites for the root built.

@oshadura, thank you for reply.

Still isn’t clear, sorry :slight_smile: pyroot gained new features, great for it. But I don’t need pyroot at all, so why do I have to install python development libs for 6-20-02 onwards?

Thank you.

UPD Finally I decided to check whether ROOT really needs libpython-dev to build, so I performed the following steps:

  1. Installed python-dev and python3-dev
  2. Configured via cmake (now it worked)
  3. Switched OFF both pyroot and pyroot_experimental
  4. Uninstalled both python-dev and python3-dev
  5. Built the ROOT (make). Succeeded.

Hence, ROOT doesn’t need python-dev really (otherwise it’d just fail to build), and it seems to be a bug in CMake configuration which claiming it needs python-dev to work properly.


@telzhov we adopted a procedure of discovery of Python components for ROOT. Master (fix is merged) and 6.20.00 patches got fixed to be able to be build ROOT without python-devel (without PyROOT enabled):

Thanks a lot for feedback!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.