ROOT Version: 6.20.04 source
Platform: WSL Ubuntu 20.04
CMake version: 3.16.3
Python3 version: 3.8.2
Python version: 2.7.18
Hello -
I have been pulling my hair out the last few days trying to successfully install ROOT/PyROOT with Python3 and I was hoping someone could help. I am very new to the terminal, so please forgive my ignorance. I am able to successfully build and run ROOT in c++, however when I check “root-config --has-python” I get “no”. I am also unable to “import ROOT” in my Python3 scripts. Please note that I am looking to write in Python3, and I have no need for Python2 compatabilitiy.
Below are the steps I took, please let me know if I can provide more information:
- I installed the source file and all required and optional prerequisite packages. I received the following message when installing the optional packages:
Note, selecting ‘libglu1-mesa-dev’ instead of ‘xlibmesa-glu-dev’
Note, selecting ‘libglew-dev’ instead of ‘libglew1.5-dev’
Note, selecting ‘libgraphviz-dev’ instead of ‘graphviz-dev’
Note, selecting ‘python-dev-is-python2’ instead of ‘python-dev’
Note, selecting ‘libgsl-dev’ instead of ‘libgsl0-dev’
Package libqt4-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
-
Per a suggestion on another post here I also installed python3-dev
-
After tarring the source file, I cmake with:
cmake …/root-6.20.04/ -DPYTHON=ON -Dpyroot=ON -Dpyroot_experimental=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.8m -DPYTHON=/usr/lib/x86_64-linux-gnu/libpython3.8m.so.1
– The C compiler identification is GNU 9.3.0
– The CXX compiler identification is GNU 9.3.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.25.1”)
– Looking for python
– Preferring Python version 3
– Found Python: /usr/bin/python3 (found version “3.8.2”) found components: Interpreter Development
– ROOT default compression algorithm: zlib
– Found GCC. Major version 9, minor version 3
– Looking for pthread.h
– Looking for pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Found a 64bit system
– Found GNU compiler collection
– Performing Test GLIBCXX_USE_CXX11_ABI
– Performing Test GLIBCXX_USE_CXX11_ABI - Success
– ROOT Platform: linux
– ROOT Architecture: linuxx8664gcc
– Build Type: Release (flags = ‘-O3 -DNDEBUG’)
– Compiler Flags: -O3 -DNDEBUG -std=c++11 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread
– Looking for ZLib
– Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version “1.2.11”)
– Looking for Freetype
– Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version “2.10.1”)
– Looking for PCRE
– Could NOT find PCRE (missing: PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY)
– PCRE not found. Switching on builtin_pcre option
– Looking for LZMA
– Could NOT find LibLZMA (missing: LIBLZMA_LIBRARY LIBLZMA_INCLUDE_DIR LIBLZMA_HAS_AUTO_DECODER LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET)
– LZMA not found. Switching on builtin_lzma option
– Building LZMA version 5.2.4 included in ROOT itself
– Looking for ZSTD
– Could NOT find ZSTD (missing: ZSTD_LIBRARIES ZSTD_INCLUDE_DIR ZSTD_VERSION)
– ZSTD not found. Switching on builtin_zstd option
– Performing Test CXX_FLAG_STD_CPLUSPLUS11
– Performing Test CXX_FLAG_STD_CPLUSPLUS11 - Success
– Performing Test C_FLAG_STD_C99
– Performing Test C_FLAG_STD_C99 - Success
– Performing Test C_FLAG_WALL
– Performing Test C_FLAG_WALL - Success
– Performing Test CXX_FLAG_WALL
– Performing Test CXX_FLAG_WALL - Success
– Performing Test C_FLAG_WEXTRA
– Performing Test C_FLAG_WEXTRA - Success
– Performing Test CXX_FLAG_WEXTRA
– Performing Test CXX_FLAG_WEXTRA - Success
– Performing Test C_FLAG_WUNDEF
– Performing Test C_FLAG_WUNDEF - Success
– Performing Test CXX_FLAG_WUNDEF
– Performing Test CXX_FLAG_WUNDEF - Success
– Performing Test C_FLAG_WSHADOW
– Performing Test C_FLAG_WSHADOW - Success
– Performing Test CXX_FLAG_WSHADOW
– Performing Test CXX_FLAG_WSHADOW - Success
– Performing Test C_FLAG_WCAST_ALIGN
– Performing Test C_FLAG_WCAST_ALIGN - Success
– Performing Test CXX_FLAG_WCAST_ALIGN
– Performing Test CXX_FLAG_WCAST_ALIGN - Success
– Performing Test C_FLAG_WCAST_QUAL
– Performing Test C_FLAG_WCAST_QUAL - Success
– Performing Test CXX_FLAG_WCAST_QUAL
– Performing Test CXX_FLAG_WCAST_QUAL - Success
– Performing Test C_FLAG_WSTRICT_PROTOTYPES
– Performing Test C_FLAG_WSTRICT_PROTOTYPES - Success
– Looking for xxHash
– Could NOT find xxHash (missing: xxHash_LIBRARY xxHash_INCLUDE_DIR)
– xxHash not found. Switching on builtin_xxhash option
– Looking for LZ4
– Could NOT find LZ4 (missing: LZ4_LIBRARY LZ4_INCLUDE_DIR)
– LZ4 not found. Switching on builtin_lz4 option
– Looking for X11
– Found X11: /usr/include
– Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
– Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
– Looking for gethostbyname
– Looking for gethostbyname - found
– Looking for connect
– Looking for connect - found
– Looking for remove
– Looking for remove - found
– Looking for shmat
– Looking for shmat - found
– X11_INCLUDE_DIR: /usr/include
– X11_LIBRARIES: /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
– X11_Xpm_INCLUDE_PATH: /usr/include
– X11_Xpm_LIB: /usr/lib/x86_64-linux-gnu/libXpm.so
– X11_Xft_INCLUDE_PATH: /usr/include
– X11_Xft_LIB: /usr/lib/x86_64-linux-gnu/libXft.so
– X11_Xext_INCLUDE_PATH: /usr/include
– X11_Xext_LIB: /usr/lib/x86_64-linux-gnu/libXext.so
– Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
– Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
– Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version “1.6.37”)
– Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
– Looking for AfterImage
– Could NOT find AfterImage (missing: AFTERIMAGE_INCLUDE_DIR AFTERIMAGE_LIBRARIES)
– AfterImage not found. Switching on builtin_afterimage option
– Building AfterImage library included in ROOT itself
– Looking for GSL
– Found PkgConfig: /usr/bin/pkg-config (found version “0.29.1”)
– Could NOT find GSL: Found unsuitable version “”, but required is at least “1.10” (found GSL_INCLUDE_DIR-NOTFOUND)
– GSL not found. Set variable GSL_ROOT_DIR to point to your GSL installation
– Alternatively, you can also enable the option ‘builtin_gsl’ to build the GSL libraries internally’
– For the time being switching OFF ‘mathmore’ option
– Looking for OpenGL
– Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
– OpenGL (with GLU) not found. Switching off opengl option
– Looking for LibXml2
– Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
– LibXml2 not found. Switching off xml option
– Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
– OpenSSL not found, switching ON ‘builtin_openssl’ option.
– Found OpenSSL: /home/matthewlee4123/Products/root/builtins/openssl/OPENSSL-prefix/include (found version “1.0.2s”)
– Looking for MySQL
– Could NOT find MYSQL (missing: MYSQL_INCLUDE_DIR MYSQL_LIBRARIES)
– MySQL not found. Switching off mysql option
– Looking for Oracle
– Oracle not found.
– Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/10.2.0.3/client
– currently found includes:
– Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/10.2.0.3/client/lib
– currently found libs: ORACLE_LIBRARY_OCCI-NOTFOUND;ORACLE_LIBRARY_CLNTSH-NOTFOUND;ORACLE_LIBRARY_LNNZ-NOTFOUND
– Oracle not found. Switching off oracle option
– Looking for PostgreSQL
– Could NOT find PostgreSQL (missing: PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR)
– PostgreSQL not found. Switching off pgsql option
– Looking for SQLite
– Could NOT find Sqlite (missing: SQLITE_INCLUDE_DIR SQLITE_LIBRARIES)
– SQLite not found. Switching off sqlite option
– Looking for Pythia6
– Pythia6 not found. Switching off pythia6 option
– Looking for Pythia8
– Could NOT find Pythia8 (missing: PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY)
– Pythia8 not found. Switching off pythia8 option
– Looking for FFTW3
– FFTW3 not found. Set [environment] variable FFTW_DIR to point to your FFTW3 installation
– Alternatively, you can also enable the option ‘builtin_fftw3’ to build FFTW3 internally’
– For the time being switching OFF ‘fftw3’ option
– Looking for CFITSIO
– Could NOT find CFITSIO (missing: CFITSIO_LIBRARY CFITSIO_INCLUDE_DIR)
– CFITSIO not found. You can enable the option ‘builtin_cfitsio’ to build the library internally’
– For the time being switching off ‘fitsio’ option
– Looking for XROOTD
– XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation
– Alternatively, you can also enable the option ‘builtin_xrootd’ to build XROOTD internally
– For the time being switching OFF ‘xrootd’ option
– Could NOT find GFAL (missing: GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIBRARY)
– GFAL library not found. Set variable GFAL_DIR to point to your gfal installation
and the variable SRM_IFCE_DIR to the srm_ifce installation
– For the time being switching OFF ‘gfal’ option
– Checking for module ‘davix>=0.6.4’
– No package ‘davix’ found
– Looking for uuid_generate_random in uuid
– Looking for uuid_generate_random in uuid - found
– Found uuid: /usr/include
– Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
– Davix dependencies not found, switching OFF ‘davix’ option.
– Looking for TBB
– Could NOT find TBB (missing: TBB_ROOT_DIR TBB_INCLUDE_DIR TBB_LIBRARY) (Required is at least version “2018”)
– TBB not found, enabling ‘builtin_tbb’ option
– Performing Test CXX_HAS_mno_rtm
– Performing Test CXX_HAS_mno_rtm - Success
– Looking for VDT
– Could NOT find Vdt (missing: VDT_INCLUDE_DIR VDT_LIBRARY) (Required is at least version “0.4”)
– VDT not found. Ensure that the installation of VDT is in the CMAKE_PREFIX_PATH
– Switching ON ‘builtin_vdt’ option
– Cannot select cudnn without selecting cuda or tmva-gpu. Option is ignored
– Looking for BLAS for optional parts of TMVA
– Looking for sgemm_
– Looking for sgemm_ - not found
– Could NOT find BLAS (missing: BLAS_LIBRARIES)
– Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB
– Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
– Building LLVM in ‘Release’ mode.
– The ASM compiler identification is GNU
– Found assembler: /usr/bin/cc
– Looking for backtrace
– Looking for backtrace - found
– backtrace facility detected in default set of libraries
– Found Backtrace: /usr/include
– Native target architecture is X86
– Threads disabled.
– Doxygen disabled.
– Go bindings disabled.
– LLVM host triple: x86_64-unknown-linux-gnu
– LLVM default target triple: x86_64-unknown-linux-gnu
– Building with -fPIC
– Found PythonInterp: /usr/bin/python3 (found version “3.8.2”)
– Constructing LLVMBuild project information
– Linker detection: GNU ld
– SysLibs: rt;dl;-lpthread;/usr/lib/x86_64-linux-gnu/libz.so
– Targeting X86
– Targeting NVPTX
– Clang version: 5.0.0
– Cling version (from VERSION file): ROOT_0.7~dev
– Cling will look for C++ headers in ‘/usr/include/c++/9:/usr/include/x86_64-linux-gnu/c++/9:/usr/include/c++/9/backward’ at runtime.
– And then fallback to: ‘x86_64-linux-gnu-g+±9’
– Performing Test CXX_HAS_Wno_maybe_uninitialized
– Performing Test CXX_HAS_Wno_maybe_uninitialized - Success
– Performing Test __result
– Performing Test __result - Success
– Performing Test CXX_HAS_fno_rtti
– Performing Test CXX_HAS_fno_rtti - Success
– Performing Test C_HAS_Wno_strict_overflow
– Performing Test C_HAS_Wno_strict_overflow - Success
– Performing Test C_HAS_Wno_maybe_uninitialized
– Performing Test C_HAS_Wno_maybe_uninitialized - Success
– Performing Test C_HAS_Wno_parentheses_equality
– Performing Test C_HAS_Wno_parentheses_equality - Success
– Looking for m
– Looking for m - not found
– Performing Test found_setresuid
– Performing Test found_setresuid - Success
– Performing Test found_stdstringview
– Performing Test found_stdstringview - Failed
– Performing Test found_stdexpstringview
– Performing Test found_stdexpstringview - Failed
– Performing Test found_stdapply
– Performing Test found_stdapply - Failed
– Performing Test found_stdinvoke
– Performing Test found_stdinvoke - Failed
– Performing Test found_stdindexsequence
– Performing Test found_stdindexsequence - Failed
– Performing Test found_attribute_always_inline
– Performing Test found_attribute_always_inline - Success
– Performing Test has_found_attribute_noinline
– Performing Test has_found_attribute_noinline - Success
Running /home/matthewlee4123/Products/root-6.20.04/build/unix/compiledata.sh
Making /home/matthewlee4123/Products/root/include/compiledata.h
– Enabled support for: asimage builtin_afterimage builtin_clang builtin_llvm builtin_lz4 builtin_lzma builtin_openssl builtin_pcre builtin_tbb builtin_vdt builtin_xxhash builtin_zstd clad dataframe exceptions gdml http imt mlp pyroot pyroot_experimental roofit runtime_cxxmodules shared ssl tmva tmva-pymva spectrum vdt x11
– Configuring done
– Generating done
– Build files have been written to: /home/matthewlee4123/Products/root
-
Here I noticed that I seemed to successfully point ROOT to Python3 and not Python2. I know certain things have failed to be built/found, I am unsure if these are critical or just options.
-
At this point I check “root-config --has-python” and “root-config --has-python3” and I receive “no”
-
In my ROOT config file it shows:
BUILDPYTHON := yes
252 PYTHONLIBDIR :=
253 PYTHONLIB :=
254 PYTHONINCDIR := $(filter-out /usr/include, /usr/include/python3.8m)
255 PYTHONLIBFLAGS :=
256 PYTHONEXE :=
-
After building root, I still have “root-config --has-python” and “root-config --has-python3” giving “no”
-
I now notice that /root/lib/libPyROOT.so does not exist. However, I do not know why or how I can rebuild it correctly.
Please let me know if you have any suggestions!
Thank you.