Hello,
I am using root on a Snow Leopard machine.
I can compile and use root without any problems, including
linking into C++ programs, in a number of ways:
Either using macports, that installs 5.24.00, or using the
source distribution and installing via ./configure --prefix=/opt/local .
It all works fine.
The problem starts when using root with python.
When I try to import root from python, I get the following:
Python 2.6.4 (r264:75706, Nov 2 2009, 13:30:40)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap
The python I am using here is python2.6 installed via macports.
Note that htis doesn’t happen if I use the Mac Python installation located in
/System/Library/Frameworks/Python.framework/Versions/Current/bin/python
However, I did install quite a few packages for my macports python version,
for any real work I have to use the macports version.
I suppose somewhere in the root building process there is some linking going on that relies on the builtin python version. Is there a way how to tell root (either using the ports file or using some configure flags) to use the python version I am actually using?
I manage my python versions via
python_select python26
such that
which python
yields
/opt/local/bin/python
,
which points to
/opt/local/bin/python2.6
I am using now gcc44 from the macports project.
The above-mentioned python package was compiled using apples gcc 4.2.
Thanks, Bjoern