Installation problem with ROOT v6-05-02 regarding python

Hello,

I was installing v6-05-02 in openSUSE Tumbleweed which shows error during “make” as following:

[ 90%] Building CXX object tmva/pymva/CMakeFiles/PyMVA.dir/src/MethodPyGTB.cxx.o
/opt/Sources/root/tmva/pymva/src/MethodPyGTB.cxx: In member function ‘virtual void TMVA::MethodPyGTB::Init()’:
/opt/Sources/root/tmva/pymva/src/MethodPyGTB.cxx:309:60: error: ‘PyString_FromString’ was not declared in this scope
    PyObject *pName = PyString_FromString("sklearn.ensemble");
                                                            ^
/opt/Sources/root/tmva/pymva/src/MethodPyGTB.cxx: In member function ‘virtual void TMVA::MethodPyGTB::Train()’:
/opt/Sources/root/tmva/pymva/src/MethodPyGTB.cxx:423:42: error: ‘PyString_AsString’ was not declared in this scope
    PyData << PyString_AsString(model_data);
                                          ^
tmva/pymva/CMakeFiles/PyMVA.dir/build.make:102: recipe for target 'tmva/pymva/CMakeFiles/PyMVA.dir/src/MethodPyGTB.cxx.o' failed
make[2]: *** [tmva/pymva/CMakeFiles/PyMVA.dir/src/MethodPyGTB.cxx.o] Error 1
CMakeFiles/Makefile2:21332: recipe for target 'tmva/pymva/CMakeFiles/PyMVA.dir/all' failed
make[1]: *** [tmva/pymva/CMakeFiles/PyMVA.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
[root@Aditya: build_root 21:39 Jan 17, 2016]$ g

However, I have Anaconda Python including sklearn and is working nicely. and correctly detected by ROOT installer. Please help.

Thanks and Regards
Abhijit

Hello Abhijit,

Which version(s) of python are installed? This might be a similar situation as in this thread:

David

[quote=“dhsmith”]Hello Abhijit,

Which version(s) of python are installed? This might be a similar situation as in this thread:

David[/quote]
Hi David,
Thanks for the handle.

I am using Anaconda Python dist and root configurator finds it as :

Found PythonInterp: /usr/bin/python (found version "3.5.1") 
-- Found Python interpreter version 3.5
-- Found PythonLibs: /usr/local/Anaconda/lib/libpython3.5m.so (found version "3.5.1") 
-- Found NumPy: version "1.10.2" /usr/local/Anaconda/lib/python3.5/site-packages/numpy/core/include
-- Looking for OpenGL

From your link I found that Pere has fixed in JIRA issue ROOT-7891 for ROOT-6-06-00. So I am trying that.
Best
Abhijit

I am on Branch Master so that I may get rid of Python related error while I am facing following problem:

[ 39%] Building CXX object io/io/CMakeFiles/RIOObjs.dir/v7/src/TFile.cxx.o
In file included from /opt/Sources/root/build_root/include/RWrap_libcpp_string_view.h:520:0,
                 from /opt/Sources/root/build_root/include/RStringView.h:26,
                 from /opt/Sources/root/build_root/include/TString.h:41,
                 from /opt/Sources/root/build_root/include/TNamed.h:29,
                 from /opt/Sources/root/build_root/include/TDirectory.h:28,
                 from /opt/Sources/root/build_root/include/TDirectoryFile.h:25,
                 from /opt/Sources/root/build_root/include/TFile.h:26,
                 from /opt/Sources/root/io/io/v7/src/TFile.cxx:16:
/opt/Sources/root/build_root/include/libcpp_string_view.h:786:89: error: template argument 1 is invalid
 struct _LIBCPP_TYPE_VIS_ONLY hash<std::experimental::basic_string_view<_CharT, _Traits> >
                                                                                         ^
/opt/Sources/root/build_root/include/libcpp_string_view.h:787:90: error: wrong number of template arguments (1, should be 2)
     : public unary_function<std::experimental::basic_string_view<_CharT, _Traits>, size_t>
                                                                                          ^
In file included from /usr/include/c++/5/string:48:0,
                 from /usr/include/c++/5/stdexcept:39,
                 from /usr/include/c++/5/array:38,
                 from /opt/Sources/root/build_root/include/ROOT/TLogger.h:18,
                 from /opt/Sources/root/build_root/include/ROOT/TDirectory.h:18,
                 from /opt/Sources/root/build_root/include/ROOT/TFile.h:18,
                 from /opt/Sources/root/io/io/v7/src/TFile.cxx:15:
/usr/include/c++/5/bits/stl_function.h:105:12: note: provided for ‘template<class _Arg, class _Result> struct std::unary_function’
     struct unary_function
            ^
In file included from /opt/Sources/root/build_root/include/RWrap_libcpp_string_view.h:520:0,
                 from /opt/Sources/root/build_root/include/RStringView.h:26,
                 from /opt/Sources/root/build_root/include/TString.h:41,
                 from /opt/Sources/root/build_root/include/TNamed.h:29,
                 from /opt/Sources/root/build_root/include/TDirectory.h:28,
                 from /opt/Sources/root/build_root/include/TDirectoryFile.h:25,
                 from /opt/Sources/root/build_root/include/TFile.h:26,
                 from /opt/Sources/root/io/io/v7/src/TFile.cxx:16:
/opt/Sources/root/build_root/include/libcpp_string_view.h:794:60: error: template argument 1 is invalid
 hash<std::experimental::basic_string_view<_CharT, _Traits> >::operator()(
                                                            ^
/opt/Sources/root/build_root/include/libcpp_string_view.h:795:15: error: reference to ‘basic_string_view’ is ambiguous
         const std::experimental::basic_string_view<_CharT, _Traits>& __val) const _NOEXCEPT
               ^
In file included from /opt/Sources/root/build_root/include/ROOT/TLogger.h:21:0,
                 from /opt/Sources/root/build_root/include/ROOT/TDirectory.h:18,
                 from /opt/Sources/root/build_root/include/ROOT/TFile.h:18,
                 from /opt/Sources/root/io/io/v7/src/TFile.cxx:15:
/usr/include/c++/5/experimental/string_view:75:11: note: candidates are: template<class _CharT, class _Traits> class std::experimental::fundamentals_v1::basic_string_view
     class basic_string_view
           ^
In file included from /opt/Sources/root/build_root/include/RWrap_libcpp_string_view.h:520:0,
                 from /opt/Sources/root/build_root/include/RStringView.h:26,
                 from /opt/Sources/root/build_root/include/TString.h:41,
                 from /opt/Sources/root/build_root/include/TNamed.h:29,
                 from /opt/Sources/root/build_root/include/TDirectory.h:28,
                 from /opt/Sources/root/build_root/include/TDirectoryFile.h:25,
                 from /opt/Sources/root/build_root/include/TFile.h:26,
                 from /opt/Sources/root/io/io/v7/src/TFile.cxx:16:
/opt/Sources/root/build_root/include/libcpp_string_view.h:195:33: note:                 template<class _CharT, class _Traits> class std::experimental::__ROOT::basic_string_view
     class _LIBCPP_TYPE_VIS_ONLY basic_string_view {
                                 ^
/opt/Sources/root/build_root/include/libcpp_string_view.h:795:51: error: expected ‘,’ or ‘...’ before ‘<’ token
         const std::experimental::basic_string_view<_CharT, _Traits>& __val) const _NOEXCEPT
                                                   ^
/opt/Sources/root/build_root/include/libcpp_string_view.h:795:77: error: non-member function ‘std::size_t std::operator()(int)’ cannot have cv-qualifier
         const std::experimental::basic_string_view<_CharT, _Traits>& __val) const _NOEXCEPT
                                                                             ^
/opt/Sources/root/build_root/include/libcpp_string_view.h:795:77: error: ‘std::size_t std::operator()(int)’ must be a nonstatic member function
In file included from /opt/Sources/root/build_root/include/TString.h:41:0,
                 from /opt/Sources/root/build_root/include/TNamed.h:29,
                 from /opt/Sources/root/build_root/include/TDirectory.h:28,
                 from /opt/Sources/root/build_root/include/TDirectoryFile.h:25,
                 from /opt/Sources/root/build_root/include/TFile.h:26,
                 from /opt/Sources/root/io/io/v7/src/TFile.cxx:16:
/opt/Sources/root/build_root/include/RStringView.h:32:30: error: reference to ‘basic_string_view’ is ambiguous
    using basic_string_view = ::std::experimental::basic_string_view<_CharT,_Traits>;
                              ^
In file included from /opt/Sources/root/build_root/include/ROOT/TLogger.h:21:0,
                 from /opt/Sources/root/build_root/include/ROOT/TDirectory.h:18,
                 from /opt/Sources/root/build_root/include/ROOT/TFile.h:18,
                 from /opt/Sources/root/io/io/v7/src/TFile.cxx:15:
/usr/include/c++/5/experimental/string_view:75:11: note: candidates are: template<class _CharT, class _Traits> class std::experimental::fundamentals_v1::basic_string_view
     class basic_string_view
           ^
In file included from /opt/Sources/root/build_root/include/RWrap_libcpp_string_view.h:520:0,
                 from /opt/Sources/root/build_root/include/RStringView.h:26,
                 from /opt/Sources/root/build_root/include/TString.h:41,
                 from /opt/Sources/root/build_root/include/TNamed.h:29,
                 from /opt/Sources/root/build_root/include/TDirectory.h:28,
                 from /opt/Sources/root/build_root/include/TDirectoryFile.h:25,
                 from /opt/Sources/root/build_root/include/TFile.h:26,
                 from /opt/Sources/root/io/io/v7/src/TFile.cxx:16:
/opt/Sources/root/build_root/include/libcpp_string_view.h:195:33: note:                 template<class _CharT, class _Traits> class std::experimental::__ROOT::basic_string_view
     class _LIBCPP_TYPE_VIS_ONLY basic_string_view {
                                 ^
In file included from /opt/Sources/root/build_root/include/TString.h:41:0,
                 from /opt/Sources/root/build_root/include/TNamed.h:29,
                 from /opt/Sources/root/build_root/include/TDirectory.h:28,
                 from /opt/Sources/root/build_root/include/TDirectoryFile.h:25,
                 from /opt/Sources/root/build_root/include/TFile.h:26,
                 from /opt/Sources/root/io/io/v7/src/TFile.cxx:16:
/opt/Sources/root/build_root/include/RStringView.h:35:12: error: ‘basic_string_view’ does not name a type
    typedef basic_string_view<char> string_view;
            ^
/opt/Sources/root/build_root/include/RStringView.h:36:12: error: ‘basic_string_view’ does not name a type
    typedef basic_string_view<char16_t> u16string_view;
            ^
/opt/Sources/root/build_root/include/RStringView.h:37:12: error: ‘basic_string_view’ does not name a type
    typedef basic_string_view<char32_t> u32string_view;
            ^
/opt/Sources/root/build_root/include/RStringView.h:38:12: error: ‘basic_string_view’ does not name a type
    typedef basic_string_view<wchar_t> wstring_view;
            ^
io/io/CMakeFiles/RIOObjs.dir/build.make:123: recipe for target 'io/io/CMakeFiles/RIOObjs.dir/v7/src/TFile.cxx.o' failed
make[2]: *** [io/io/CMakeFiles/RIOObjs.dir/v7/src/TFile.cxx.o] Error 1
CMakeFiles/Makefile2:15374: recipe for target 'io/io/CMakeFiles/RIOObjs.dir/all' failed
make[1]: *** [io/io/CMakeFiles/RIOObjs.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2