Hi,
ROOT 6.13/03 Built for linuxx8664gcc From heads/master@v6-13-02-720-g49a64e5
How did I install root?
$ sudo mkdir /opt/root6
$ sudo chown andre /opt/root6
$ cd /opt/root6
$ git clone http://root.cern.ch/git/root.git root6_src
$ cmake -DPYTHIA8_DIR=/home/andre/pythia8226 -Dpythia8=ON -Dpython=ON -Droofit=ON -Dhttp=ON -Dccache=ON -Dcling=ON /opt/root6/root6_src/
$ sudo make -j4 && sudo make install
# This work very well!
And I get the following problem using the
command line: rootls -t
file.root
Traceback (most recent call last):
File "/opt/root6/bin/rootls", line 10, in <module>
import cmdLineUtils
File "/opt/root6/lib/cmdLineUtils.py", line 82, in <module>
import ROOT
File "/opt/root6/lib/ROOT.py", line 24, in <module>
import cppyy
File "/opt/root6/lib/cppyy.py", line 61, in <module>
import libPyROOT as _backend
ImportError: No module named libPyROOT
This error begin after install jupyter-notebook
(root-notebook
) with Anaconda:
$ python --version
Python 3.6.3 :: Anaconda, Inc.
Installed in the system: python2 and python3:
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49)
[GCC 7.2.0] on linux
to fix the problem I try using some tips in this post how-to-properly-install-pyroot-for-python
I try rebuild the root:
Add in the cmake config:
cmake -DPYTHON_EXECUTABLE=/usr/bin/python -Dpython=ON /opt/root6/root6_src/
-- ROOT default compression algorithm is lz4
...
-- Found PythonInterp: /home/andre/anaconda3/bin/python (found version "3.6.3")
-- Found NUMPY: /home/andre/anaconda3/lib/python3.6/site-packages/numpy/core/include (found version "1.13.3")
...
-- Configuring done
CMake Warning at cmake/modules/RootNewMacros.cmake:629 (add_library):
Cannot generate a safe runtime search path for target PyROOT because there
is a cycle in the constraint graph:
dir 0 is [/usr/local/lib]
dir 1 must precede it due to runtime library [libTreePlayer.so]
dir 1 is [/opt/root6/lib]
dir 0 must precede it due to runtime library [libPyROOT.so]
Some of these libraries may not be found correctly.
Call Stack (most recent call first):
cmake/modules/RootNewMacros.cmake:957 (ROOT_LINKER_LIBRARY)
bindings/pyroot/CMakeLists.txt:16 (ROOT_STANDARD_LIBRARY_PACKAGE)
CMake Warning at cmake/modules/RootNewMacros.cmake:629 (add_library):
Cannot generate a safe runtime search path for target PyMVA because there
is a cycle in the constraint graph:
dir 0 is [/usr/local/lib]
dir 1 must precede it due to runtime library [libTMVA.so]
dir 1 is [/opt/root6/lib]
dir 0 must precede it due to runtime library [libPyROOT.so]
Some of these libraries may not be found correctly.
Call Stack (most recent call first):
cmake/modules/RootNewMacros.cmake:957 (ROOT_LINKER_LIBRARY)
tmva/pymva/CMakeLists.txt:20 (ROOT_STANDARD_LIBRARY_PACKAGE)
-- Generating done
-- Build files have been written to: /opt/root6
$ sudo make -j4 && sudo make install
[ 97%] Built target G__TMVAGui
[ 97%] Built target G__Genetic
[ 97%] Built target G__PyMVA
[ 97%] Built target G__Gviz3d
[ 97%] Built target G__Eve
[ 97%] Built target Genetic
Scanning dependencies of target HistFactory
[ 97%] Built target Gviz3d
Scanning dependencies of target TMVAGui
Scanning dependencies of target PyMVA
CMakeFiles/PyROOT.dir/src/Converters.cxx.o: In function `PyROOT::TConverter::FromMemory(void*)':
/opt/root6/root6_src/bindings/pyroot/src/Converters.cxx:138: undefined reference to `PyExc_TypeError'
/opt/root6/root6_src/bindings/pyroot/src/Converters.cxx:138: undefined reference to `PyErr_SetString'
CMakeFiles/PyROOT.dir/src/Converters.cxx.o: In function `PyROOT::TConverter::ToMemory(_object*, void*)':
/opt/root6/root6_src/bindings/pyroot/src/Converters.cxx:147: undefined reference to `PyExc_TypeError'
/opt/root6/root6_src/bindings/pyroot/src/Converters.cxx:147: undefined reference to `PyErr_SetString'
CMakeFiles/PyROOT.dir/src/Converters.cxx.o: In function `PyROOT::TVoidConverter::SetArg(_object*, PyROOT::TParameter&, PyROOT::TCallContext*)':
/opt/root6/root6_src/bindings/pyroot/src/Converters.cxx:479: undefined reference to `PyExc_SystemError'
/opt/root6/root6_src/bindings/pyroot/src/Converters.cxx:479: undefined reference to `PyErr_SetString'
...
CMakeFiles/PyROOT.dir/src/Utility.cxx.o: In function `PyROOT::Utility::ErrMsgHandler(int, bool, char const*, char const*)':
/opt/root6/root6_src/bindings/pyroot/src/Utility.cxx:831: undefined reference to `PyErr_WarnExplicit'
collect2: error: ld returned 1 exit status
bindings/pyroot/CMakeFiles/PyROOT.dir/build.make:979: recipe for target 'lib/libPyROOT.so' failed
make[2]: *** [lib/libPyROOT.so] Error 1
CMakeFiles/Makefile2:29013: recipe for target 'bindings/pyroot/CMakeFiles/PyROOT.dir/all' failed
make[1]: *** [bindings/pyroot/CMakeFiles/PyROOT.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 97%] Building CXX object tmva/pymva/CMakeFiles/PyMVA.dir/src/MethodPyAdaBoost.cxx.o
/opt/root6/root6_src/tmva/pymva/src/MethodPyAdaBoost.cxx:20:91: fatal error: Python.h: No such file or directory
compilation terminated.
tmva/pymva/CMakeFiles/PyMVA.dir/build.make:113: recipe for target 'tmva/pymva/CMakeFiles/PyMVA.dir/src/MethodPyAdaBoost.cxx.o' failed
make[2]: *** [tmva/pymva/CMakeFiles/PyMVA.dir/src/MethodPyAdaBoost.cxx.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:29675: recipe for target 'tmva/pymva/CMakeFiles/PyMVA.dir/all' failed
make[1]: *** [tmva/pymva/CMakeFiles/PyMVA.dir/all] Error 2
[ 97%] Built target TMVAGui
[ 98%] Built target HistFactory
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
Someone can help me? sorry by the long question
Cheers, Andre.