# 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:** 21

<div class="post-metadata">

**Author:** ![ksmith](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ksmith/32/12567_2.png) [@ksmith](https://root-forum.cern.ch/u/ksmith)\
**Post date:** [October 18, 2017, 8:39pm UTC](https://root-forum.cern.ch/t/pyroot-cannot-open-file-error-in-tnetxngfile-open-fatal-auth-failed/26593/21 "2017-10-18T20:39:04Z")

</div>

> [@mwilkins](#):
>
> 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.

Thanks for doing the leg work on this. In addition to assisting those who want to use non-default python versions this is also needed for python3 installations when python2 is the default. I was going to update the other topic, but it is locked. So the best I can do is link it here and hope that it is seen by others with this issue:

> [@How to properly install PyROOT for Python 3?](https://root-forum.cern.ch/t/how-to-properly-install-pyroot-for-python-3/26367/3):
>
> You can use -DPYTHON\_EXECUTABLE=/path/to/desired/python without aliasing anything.

> [@mwilkins](#):
>
> 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.

You can always create an alias that points to the python2 version:

```auto
alias python=python2

```

---

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