When I try to import root on python3 I get the error:
ModuleNotFoundError: No module named 'root'
I compiled root from source by using
cmake -DCMAKE_INSTALL_PREFIX=/opt/ROOT -DPYTHON=ON -Dpyroot=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.8 ..
While configuring it said found python
in my config file it says:
BUILDPYTHON := yes PYTHONLIBDIR := /usr/lib/x86_64-linux-gnu PYTHONLIB := /usr/lib/x86_64-linux-gnu/libpython3.8.so PYTHONINCDIR := $(filter-out /usr/include, /usr/include/python3.8) PYTHONLIBFLAGS := PYTHONEXE :=
I sourced the ROOTSYS to my ~/.bashrc
I also added root/lib to my PYTHONPATH
When I do
root-config --has-python it says no
When I do
root-config --features it says:
cxx14 asimage builtin_afterimage builtin_clang builtin_gl2ps builtin_llvm builtin_lz4 builtin_lzma builtin_nlohmannjson builtin_openui5 builtin_tbb builtin_vdt builtin_xrootd builtin_xxhash builtin_zstd clad dataframe exceptions fftw3 fitsio gdml http imt mathmore mlp mysql opengl pyroot roofit webgui root7 runtime_cxxmodules shared ssl tmva tmva-cpu tmva-pymva spectrum vdt x11 xml xrootd
I’m not sure if it has anything to do with my problem but after the installation I had an error when I run root:
It was something like … file doesn’t exist in /opt/ROOT/etc/…
When I checked that directory that file was there but etc directory didn’t have permission for user and other. So I gave permission with:
sudo chmod -R a+rx etc
Then root started to work.
Also in libraries I try to find libpyroot but it doesn’t exist.
Here is my make output:
make.out.txt (950.6 KB)
There is no other ROOT installation in my PC this is my first time installing ROOT to this pc.
Platform: Xubuntu 20.04