I installed 32-bit Enthought Python Distribution, then installed mercurial and get a similar error:
> hg
Traceback (most recent call last):
File "/usr/local/bin/hg", line 25, in <module>
mercurial.util.set_binary(fp)
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 75, in __getattribute__
self._load()
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 47, in _load
mod = _origimport(head, globals, locals)
File "/Library/Python/2.6/site-packages/mercurial/util.py", line 16, in <module>
from i18n import _
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 106, in _demandimport
mod = _origimport(name, globals, locals)
File "/Library/Python/2.6/site-packages/mercurial/i18n.py", line 23, in <module>
t = gettext.translation('hg', localedir, fallback=True)
File "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/gettext.py", line 465, in translation
mofiles = find(domain, localedir, languages, all=1)
File "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/gettext.py", line 437, in find
for nelang in _expand_lang(lang):
File "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/gettext.py", line 131, in _expand_lang
from locale import normalize
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 85, in _demandimport
return _origimport(name, globals, locals, fromlist)
File "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/locale.py", line 98, in <module>
@functools.wraps(_localeconv)
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 75, in __getattribute__
self._load()
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 47, in _load
mod = _origimport(head, globals, locals)
File "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/functools.py", line 10, in <module>
from _functools import partial, reduce
File "/Library/Python/2.6/site-packages/mercurial/demandimport.py", line 106, in _demandimport
mod = _origimport(name, globals, locals)
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/lib-dynload/_functools.so, 2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/lib-dynload/_functools.so: mach-o, but wrong architecture