PyROOT cannot open file: "Error in <TNetXNGFile::Open>: [FATAL] Auth failed"

@ksmith So it looks like you’re right. It’s an issue with SIP that can be worked around using a different, non-system python. However, that one flag alone is not enough. I had to do:

cmake -Dall=On -DPYTHON_EXECUTABLE=/usr/local/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/Headers -DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib ../root/ 

pointing it at the Homebrew version of python. Now, everything works as expected, i.e.:

$ python
Python 2.7.13 |Anaconda, Inc.| (default, Sep 21 2017, 17:38:20) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
$ python2
Python 2.7.14 (default, Sep 25 2017, 09:54:19) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT; f = ROOT.TFile.Open("root://eoslhcb.cern.ch//eos/lhcb/user/m/mwilkins/bfractions_fromGanga/data/Down16/548.100/DVnTuples.root")

(From start to finish, the only steps seem to be brew install python, checking out the git repo, doing the fix mentioned here, making a root_build directory and navigating to it, then doing cmake as above, then make.)

I think I’d prefer the Anaconda version (if only so I can type python instead of python2 at the prompt), so I have to track down its include dir and libraries for the flags, but I have a function version of ROOT now. Thanks again for all your help.