Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Starfox

macrumors 6502
Original poster
Apr 7, 2011
256
9
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/python27.zip /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?
 
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/python27.zip /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?
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.
 
Code:
1. Re-install Mercurial for OS X 10.6 from http://mercurial.selenic.com/downloads/
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.

Source: http://www.tobiasmuehlbauer.com/2011/07/06/mercurial-scm-hg-fix-for-os-x-10-7-lion/
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.