it all works. But the problem is when I try to use pyROOT, I get the following error:
python -i
python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
import ROOT
Traceback (most recent call last):
File “”, line 1, in
File “lib/ROOT.py”, line 85, in
import libPyROOT as _root
ImportError: dlopen(/Users/tsandoval/phd/root/lib/libPyROOT.so, 2): no suitable image found. Did find:
/Users/tsandoval/phd/root/lib/libPyROOT.so: mach-o, but wrong architecture
/Users/tsandoval/phd/root/lib/libPyROOT.so: mach-o, but wrong architecture
Indeed if one does:
file which root
/Users/tsandoval/phd/root/bin/root: Mach-O executable i386
not a Mac expert here, but it looks to me like your system is really x86_64, not i386. But now with i386 selected, I think you can still run by doing:[code]$ arch -i386 python
Thanks but that doesn’t work for me either… I have tried the following:
Installing root_v5.28.00c.macosx106-x86_64-gcc-4.2.tar, then ‘arch -x86_64 python’ and ‘arch -i386 python’ for which I get the following error in both cases:
Installing root_v5.28.00c.macosx106-i386-gcc-4.2.tar and then doing ‘arch -i386 python’ and ‘arch -x86_64 python’ for which I get the following error for both cases:
import ROOT
Traceback (most recent call last):
File “”, line 1, in
File “lib/ROOT.py”, line 85, in
import libPyROOT as _root
ImportError: dlopen(/Users/tsandoval/phd/root/lib/libPyROOT.so, 2): no suitable image found. Did find:
/Users/tsandoval/phd/root/lib/libPyROOT.so: mach-o, but wrong architecture
/Users/tsandoval/phd/root/lib/libPyROOT.so: mach-o, but wrong architecture
If I type in my terminal:
arch
I get i386, hence why I was downloading root_v5.28.00c.macosx106-i386-gcc-4.2.tar.
the version error I’ve seen mostly when a python library other than the system one was used (with both being loaded), but you are using the system version of python, no?
As for arch returning i386, does so on my system too, but I’d swear it’s 64b.
what I meant was that some people like fink or macports and install their python from there. What then often happens is that version mismatch error that you saw. But I think you’re running the system python? Can you show the result of which python?
As for running, I would have guessed that installing x86_64 should just work with the normal python command, which is why I’d first like to see whether you have the system python (for reference, myself I always run with the system python, unless debugging fink stuff, and build from source using configure with mostly the default sets of variables).
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
sorry, I was looking for the output of “which python” not “which python”. The former gives the location of the python executable, the latter does to but then also starts it.
I don’t have a Mac 10.6 handy, so I don’t know with which version of python it ships. By seeing the path, it’s possible to see whether it’s the version that comes with the OS or a different, later install.
that all looks standard … I’m at a loss as what else could be a problem. The only thing I can further recommend is to build from source instead of installing the binaries.
it’s real easy as the mac should be recognized as a platform and python found automatically. See this article on root.cern.ch: http://root.cern.ch/drupal/content/installing-root-source. Basically: download, untar, run “./configure --prefix=/Users/tsandoval/phd/root” (I’m guessing that prefix from your other postings here), followed by “make” and “make install”.
FWIW: I actually have been dealing with a somewhat similar issue on a Mac today (there was a MacPorts python as newest on the system, and it give wrong architecture errors).
I opted for installing the latest python (shipped is p2.5) from source. For the configuration, I needed teh following set of options (which were new to me):./configure --enable-framework --with-universal-archs=intel --enable-universalsdk=/Developer/SDKs/MacOSX10.5.sdkwhere for newer Macs, you’ll need to select a newer SDK (older ones are usually available and the 10.4 is selected by default, which didn’t work for me). Just have a look whatever is on your system. Follow this with the standard “make && make install” and the resulting python (under /usr/local but also in the /Library/Frameworks location) worked for me.
I then configured ROOT with this newly build python first in $PATH and all worked out-of-the-box.