Cannot access file in python "unsafe use of relative rpath"

Okay so I found on this thread that python quitting is due to conflicting python versions. The same thread recommends sticking with the system build though.

I think this is a legitimate bug related to Apple’s introduction of System Integrity Protection. I was able to fix it using install_name_tool. Unfortunately, there were several such links so it needed to be done multiple times; there’s a suggestion here for doing it automatically, but I just did it manually:

$ install_name_tool -change libXrdUtils.2.dylib /Applications/root_build/lib/libXrdUtils.2.dylib /Applications/root_build/lib/libNetxNG.so
$ python
Python 2.7.10 (default, Jul 15 2017, 17:16:57) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ROOT import TFile
>>> f = TFile.Open("root://eoslhcb.cern.ch//eos/lhcb/user/m/mwilkins/bfractions_fromGanga/data/Down16/548.100/DVnTuples.root")
cling::DynamicLibraryManager::loadLibrary(): dlopen(/Applications/root_build/lib/libNetxNG.so, 9): Library not loaded: libXrdCl.2.dylib
  Referenced from: /Applications/root_build/lib/libNetxNG.so
  Reason: unsafe use of relative rpath libXrdCl.2.dylib in /Applications/root_build/lib/libNetxNG.so with restricted binary
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libNetxNG.so for TNetXNGSystem
cling::DynamicLibraryManager::loadLibrary(): dlopen(/Applications/root_build/lib/libNetxNG.so, 9): Library not loaded: libXrdCl.2.dylib
  Referenced from: /Applications/root_build/lib/libNetxNG.so
  Reason: unsafe use of relative rpath libXrdCl.2.dylib in /Applications/root_build/lib/libNetxNG.so with restricted binary
cling::DynamicLibraryManager::loadLibrary(): dlopen(/Applications/root_build/lib/libNetxNG.so, 9): Library not loaded: libXrdCl.2.dylib
  Referenced from: /Applications/root_build/lib/libNetxNG.so
  Reason: unsafe use of relative rpath libXrdCl.2.dylib in /Applications/root_build/lib/libNetxNG.so with restricted binary
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libNetxNG.so for TNetXNGFile
cling::DynamicLibraryManager::loadLibrary(): dlopen(/Applications/root_build/lib/libNetxNG.so, 9): Library not loaded: libXrdCl.2.dylib
  Referenced from: /Applications/root_build/lib/libNetxNG.so
  Reason: unsafe use of relative rpath libXrdCl.2.dylib in /Applications/root_build/lib/libNetxNG.so with restricted binary
>>> ^D
$ install_name_tool -change libXrdCl.2.dylib /Applications/root_build/lib/libXrdCl.2.dylib /Applications/root_build/lib/libNetxNG.so
$ python
Python 2.7.10 (default, Jul 15 2017, 17:16:57) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ROOT import TFile ; f = TFile.Open("root://eoslhcb.cern.ch//eos/lhcb/user/m/mwilkins/bfractions_fromGanga/data/Down16/548.100/DVnTuples.root")
cling::DynamicLibraryManager::loadLibrary(): dlopen(/Applications/root_build/lib/libNetxNG.so, 9): Library not loaded: libXrdXml.2.dylib
  Referenced from: /Applications/root_build/lib/libXrdCl.2.dylib
  Reason: unsafe use of relative rpath libXrdXml.2.dylib in /Applications/root_build/lib/libXrdCl.2.dylib with restricted binary
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libNetxNG.so for TNetXNGSystem
cling::DynamicLibraryManager::loadLibrary(): dlopen(/Applications/root_build/lib/libNetxNG.so, 9): Library not loaded: libXrdXml.2.dylib
  Referenced from: /Applications/root_build/lib/libXrdCl.2.dylib
  Reason: unsafe use of relative rpath libXrdXml.2.dylib in /Applications/root_build/lib/libXrdCl.2.dylib with restricted binary
cling::DynamicLibraryManager::loadLibrary(): dlopen(/Applications/root_build/lib/libNetxNG.so, 9): Library not loaded: libXrdXml.2.dylib
  Referenced from: /Applications/root_build/lib/libXrdCl.2.dylib
  Reason: unsafe use of relative rpath libXrdXml.2.dylib in /Applications/root_build/lib/libXrdCl.2.dylib with restricted binary
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libNetxNG.so for TNetXNGFile
cling::DynamicLibraryManager::loadLibrary(): dlopen(/Applications/root_build/lib/libNetxNG.so, 9): Library not loaded: libXrdXml.2.dylib
  Referenced from: /Applications/root_build/lib/libXrdCl.2.dylib
  Reason: unsafe use of relative rpath libXrdXml.2.dylib in /Applications/root_build/lib/libXrdCl.2.dylib with restricted binary
>>> ^D
$ install_name_tool -change libXrdXml.2.dylib /Applications/root_build/lib/libXrdXml.2.dylib /Applications/root_build/lib/libXrdCl.2.dylib
...

etc.

Now I’ve got a new problem:

$ python
Python 2.7.10 (default, Jul 15 2017, 17:16:57) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ROOT import TFile
>>> f = TFile.Open("root://eoslhcb.cern.ch//eos/lhcb/user/m/mwilkins/bfractions_fromGanga/data/Down16/548.100/DVnTuples.root")
Error in <TNetXNGFile::Open>: [FATAL] Auth failed

But it seems unrelated to the original problem in this post, so I will simply start a new thread. Thanks much for taking the time to help, everyone.

By the way, there are WAY too many problems trying to get this installation up and running. I almost regret even trying.