PyROOT issues on OS X 10.11 (El Capitan)

More fun:% lldb /usr/bin/python (lldb) target create "/usr/bin/python" Current executable set to '/usr/bin/python' (x86_64). (lldb) b setenv Breakpoint 1: where = libsystem_c.dylib`setenv, address = 0x00000000000647e7 (lldb) run error: process exited with status -1 (cannot attach to process due to System Integrity Protection) (lldb)
Again no such issues with port’s python. Giving up on system one.

-Dom

P.S. Apple’s take on SIP

THIS WORKED (for the dmg file of 5.34 built for OS X 10.10 from root.cern.ch)!!!

for i in /Applications/root_v5.34.32/lib/lib*.so ; do install_name_tool -add_rpath /Applications/root_v5.34.32/lib $i done

That command did NOT work for ROOT6 that I built (successfully) from scratch.

And while ROOT6 worked for me on its own, it would crash and create segment faults just from closing the TBrowser window, or any window. So I am just going back to ROOT5 at this point.

Thank you ALL for your help.

I am sorry, but what is the status of this?
Did you handle to use pyROOT?

As far I can see with ‘master’, ‘6.04/04’ and ‘5.34/34’ there is no problem running PyROOT from the build area (using CMake) or from the installation area if build with the option -Drpath=ON. Do you have still a problem?

The problem that I cannot use the system-bundled Python installation persists for me.

Did you try with -Drpath=ON ? According to issue https://sft.its.cern.ch/jira/browse/ROOT-7709 shoud fix the problem. Can can also change it as default for MacOSX.

I manually fixed the rpath using the suggestion earlier in the topic, but for the standard python that does not help. I have not recompiled since using the rpath flag, but I assume that this does exactly the same?

It adds into the RPATH of libPyROOT.so the location of libPython.dylib
In my case for example:

otool -l libPyROOT.so
...
Load command 11
          cmd LC_LOAD_DYLIB
      cmdsize 88
         name /Library/Frameworks/Python.framework/Versions/2.7/Python (offset 24)
   time stamp 2 Thu Jan  1 01:00:02 1970
      current version 2.7.0
 ...     

Hi,

the issue with PyROOT and the native El Capitan python has been fixed in the head of v5-34 and the master using the classic make system. It works with and without --rpath being specified. Notice that when rpath is used in the cmake or classic make version you will get a non-relocatable build. The fix will soon be available in the cmake build system too.

Cheers, Fons.

This still does not seem to be fixed in “master” a.k.a. 6.07/03 for “cmake” build. I still get “make install” to strip the rpath from the libraries (even though I do supply -Drpath=ON to cmake).

The “configure” method of building does seem to work.

Dear all,
I guess I have the same problem, on my personal laptop with ROOT 6.07/03 I tried to call TPython::Prompt(), but it gave me:

root [4] TPython::Prompt()
cling::DynamicLibraryManager::loadLibrary(): dlopen(/Users/ramikamalieddin/ROOT/buildROOT/lib/libPyROOT.so, 9): Library not loaded: libpython3.5m.dylib
Referenced from: /Users/ramikamalieddin/ROOT/buildROOT/lib/libPyROOT.so
Reason: image not found
IncrementalExecutor::executeFunction: symbol ‘_ZN7TPython6PromptEv’ unresolved while linking [cling interface function]!
You are probably missing the definition of TPython::Prompt()
Maybe you need to load the corresponding shared library?

I tried to add the famous export statement for those who have El Capitan, it did not work, then I came accross this blog:
alexpearce.me/2016/02/root-on-os-x-el-capitan/
Brew gives no installation errors, nothing wrong, but I still get:

root [0] TPython::Prompt()
cling::DynamicLibraryManager::loadLibrary(): dlopen(/Users/ramikamalieddin/ROOT/buildROOT/lib/libPyROOT.so, 9): Library not loaded: libpython3.5m.dylib
Referenced from: /Users/ramikamalieddin/ROOT/buildROOT/lib/libPyROOT.so
Reason: image not found
IncrementalExecutor::executeFunction: symbol ‘_ZN7TPython6PromptEv’ unresolved while linking [cling interface function]!
You are probably missing the definition of TPython::Prompt()
Maybe you need to load the corresponding shared library?

and

Rami$ python3
Python 3.5.2 |Anaconda custom (x86_64)| (default, Jul 2 2016, 17:52:12)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

import ROOT
Traceback (most recent call last):
File “”, line 1, in
File “/Users/ramikamalieddin/ROOT/buildROOT/lib/ROOT.py”, line 24, in
import cppyy
File “/Users/ramikamalieddin/ROOT/buildROOT/lib/cppyy.py”, line 60, in
import libPyROOT as _backend
ImportError: dlopen(/Users/ramikamalieddin/ROOT/buildROOT/lib/libPyROOT.so, 2): Library not loaded: libpython3.5m.dylib
Referenced from: /Users/ramikamalieddin/ROOT/buildROOT/lib/libPyROOT.so
Reason: image not found

Thanks for looking at my question,
Rami