I’ve compiled ROOT using:
cmake ../root -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_INCLUDEDIR=/usr/include -Dgnuinstall=ON -Dall=ON -Dsoversion=ON
because i want to include ROOT library normally as common library C++.
As you can see i’ve installed ROOT in /usr/local, and after that i did “make -j2”, “make install” and than “source /usr/local/bin/thisroot.sh”.
If i write “root” in my terminal it works very well, but if i open python and then i write “import ROOT” this is what appen:
casa@casa-server:~$ python3
Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 17:14:51)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ROOT'
It is the same with python2:
casa@casa-server:~$ python2
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named ROOT
What is the problem?