Python26 and Mercurial Error

Robert Sanford wobbet at gmail.com
Mon Nov 16 08:45:46 PST 2009


Running SnowLeopard on 32-bit MacBookPro2,2.

I edited my config file to add +universal for all ports.

I performed a 
  sudo port clean --all all

Followed by installing Python26 and Mercurial.

When I attempt to execute
  hg clone ...

I receive the following trace indicating that _locale is missing. 

Did I miss something in my install process?

Many thanks!

rjsjr


Traceback (most recent call last):
  File "/opt/local/bin/hg", line 27, in <module>
    mercurial.dispatch.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 16, in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 27, in dispatch
    return _runcatch(u, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 97, in _runcatch
    ui.warn(_("abort: could not import module %s!\n") % m)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/i18n.py", line 43, in gettext
    return u.encode(encoding.encoding, "replace")
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/demandimport.py", line 75, in __getattribute__
    self._load()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/demandimport.py", line 47, in _load
    mod = _origimport(head, globals, locals)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/encoding.py", line 22, in <module>
    encoding = locale.getpreferredencoding() or 'ascii'
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/locale.py", line 531, in getpreferredencoding
    import _locale
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/demandimport.py", line 84, in _demandimport
    return _origimport(name, globals, locals, fromlist)
ImportError: No module named _locale


More information about the macports-users mailing list