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

**URL:** <https://root-forum.cern.ch/t/pyroot-cannot-open-file-error-in-tnetxngfile-open-fatal-auth-failed/26593>\
**Category:** ROOT\
**Created:** [October 17, 2017, 11:46am UTC](https://root-forum.cern.ch/t/pyroot-cannot-open-file-error-in-tnetxngfile-open-fatal-auth-failed/26593 "2017-10-17T11:46:01Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![mwilkins](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mwilkins/32/28332_2.png) [@mwilkins](https://root-forum.cern.ch/u/mwilkins)\
**Post date:** [October 18, 2017, 4:52pm UTC](https://root-forum.cern.ch/t/pyroot-cannot-open-file-error-in-tnetxngfile-open-fatal-auth-failed/26593/20 "2017-10-18T16:52:04Z")

</div>

@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:

```auto
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.:

```auto
$ 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](https://root-forum.cern.ch/t/compiling-problem-root-6-11-02/26479/2), 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.

---

_[View the full topic](https://root-forum.cern.ch/t/pyroot-cannot-open-file-error-in-tnetxngfile-open-fatal-auth-failed/26593)._
