PyRoot Issue importing ROOT with Python 2.7 and ROOT 5

On macOS 10.13.6 running python 2.7 and ROOT 5 installed via macports when I try to import ROOT in python I get the following error:

Jacks-MacBook-Pro-2:~ Jack$ python

Python 2.7.15 (default, May 2 2018, 00:53:27)

[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin

Type “help”, “copyright”, “credits” or “license” for more information.

>>> import ROOT

Note: (file “(tmpfile)”, line 2) File “iostream” already loaded

Traceback (most recent call last):

File “<stdin>”, line 1, in <module>

File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ROOT.py”, line 239, in <module>

_root.CreateScopeProxy( "TTree" ).__iter__    = _TTree__iter__

AttributeError: ‘module’ object has no attribute ‘CreateScopeProxy’

Is there a known solution to this issue?


_ROOT Version: ROOT 5
_Platform: Mac OS 10.13.6
_Compiler: GCC 4.2.1


ROOT v5 is not known to work with XCode 9 (Apple often makes backward incompatible changes that would requires updates to the (obsolete) v5 code.

Please try with ROOT v6 (v6.14/04 recommended).

Cheers,
Philippe.

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