Lion broke Mercurial (Hg), can't get it to work

Discussion in 'Mac OS X Lion (10.7)' started by Starfox, Jul 20, 2011.

  1. Starfox macrumors 6502


    Apr 7, 2011
    I just upgraded to Lion and now Mercurial broke. Hg commands in Terminal give me this:

    abort: couldn't find mercurial libraries in [/usr/platlib/Library/Python/2.6/site-packages /usr/local/bin /System/Library/Frameworks/Python.framework/Versions/2.7/lib/ /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC /Library/Python/2.7/site-packages]
    (check your install and PYTHONPATH)

    I tried re-installing but no luck. Any idea what I can do?
  2. mrapplegate macrumors 68030

    Feb 26, 2011
    Cincinnati, OH
    Does Mercurial need Python 2.6 and Lion has the newer 2.7? I would think a newer version would be compatible with 2.6.
    I don't use it, so I'm not sure. Contact them for support.
  3. kamasheto macrumors newbie

    Jan 3, 2009
    1. Re-install Mercurial for OS X 10.6 from
    2. Open the file /usr/local/bin/hg:
    sudo vim /usr/local/bin/hg
    3. Replace the line
    libdir = '../../platlib/Library/Python/2.6/site-packages/'
    with libdir = '/Library/Python/2.6/site-packages'
    I'm not sure you'll have to do step 1, but I had done it anyway before reading the steps.


Share This Page