ROOT Version: 6.10/08
Platform: MACOS
Compiler: Not Provided
Dear experts,
After some changes between python 3 and python 2.7 I got some errors in
my pyROOT script
import ROOT
File "/Users/lisapaspalaki/Downloads/build_root_6_2/lib/ROOT.py", line 24, in <module>
import cppyy
File "/Users/lisapaspalaki/Downloads/build_root_6_2/lib/cppyy.py", line 61, in <module>
import libPyROOT as _backend
ImportError: dlopen(/Users/lisapaspalaki/Downloads/build_root_6_2/lib/libPyROOT.so, 2): Library not loaded: /usr/local/opt/python/Frameworks/Python.framework/Versions/3.6/Python
Referenced from: /Users/lisapaspalaki/Downloads/build_root_6_2/lib/libPyROOT.so
Reason: image not found
I thought that building root again would fix the problem but the build fails.
I did:
cmake -Droofit=ON -Dminuit2=ON -DPYTHON_EXECUTABLE=/usr/bin/python -DPYHTON_INCDIR=/usr/local/include/ -DPYTHON_LIBDIR=/usr/lib .
cmake --build . -- -j4
The error I get is:
In file included from /Users/lisapaspalaki/Downloads/download_root_6_10_08/root/bindings/pyroot/src/Executors.cxx:5:
/Users/lisapaspalaki/Downloads/download_root_6_10_08/root/bindings/pyroot/src/PyROOT.h:38:10: fatal error: 'Python.h' file not
found
#include "Python.h"
^~~~~~~~~~
In file included from /Users/lisapaspalaki/Downloads/download_root_6_10_08/root/bindings/pyroot/src/MethodProxy.cxx:5:
/Users/lisapaspalaki/Downloads/download_root_6_10_08/root/bindings/pyroot/src/PyROOT.h:38:10: fatal error: 'Python.h' file not
found
#include "Python.h"
^~~~~~~~~~
1 error generated.
The python version I have is
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.
and which python
/usr/bin/python
Please let me know if you have a solution to this problem.
Best,
Lisa