Import ROOT not working after installing Anaconda


My root version is 6.06/06. Earlier Its working fine but when I installed Anaconda so after that I realized that I am not able to do “from ROOT import TH1F”. Whenever I does this is complains me

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ramkrishna/ROOT/v6-06-06/lib/", line 24, in <module>
    import cppyy
  File "/home/ramkrishna/ROOT/v6-06-06/lib/", line 60, in <module>
    import libPyROOT as _backend
ImportError: /home/ramkrishna/anaconda2/bin/../lib/ version `GLIBCXX_3.4.20' not found (required by /home/ramkrishna/ROOT/v6-06-06/lib/

Python version installed in my laptop is Python 2.7.13 .

Please let me know how I can fix this?

with regards,

Move Anaconda’s python out of the way, for instance by adjusting the $PATH.

Dear Axel,

Please let me know how I can do this?

I don’t know Anaconda. I’d suppose (as I wrote) that it’s injecting python into the $PATH environment variable. echo $PATH might tell you; then you have to export PATH=... (where ... is "everything but Anaconda) and then try again your from ROOT import TH1F.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.