Mercurial SCM (hg) fix for OS X 10.7 Lion
July 21st, 2011 0 CommentsAfter upgrading to Mac OS X 10.7 (Lion), The command line tool hg seemed not to work any longer:
xxxxxx:~ $ hg
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
…]
(check your install and PYTHONPATH)
Indeed, updated paths to the Python frameworks in 10.7 are the cause. To fix the problem until a version of Mercurial for 10.7 is released:
Re-install Mercurial for OS X 10.6 from http://mercurial.selenic.com/downloads/
Open the file /usr/local/bin/hg:
sudo vim /usr/local/bin/hg
Replace the line
libdir = ‘../../platlib/Library/Python/2.6/site-packages/’
with libdir = ‘/Library/Python/2.6/site-packages’
Mercurial’s hg should now work again as expected.
Update (July 17, 2011): There is a version of Mercurial for 10.7 now. Click the link below to install:
Mercurial 1.9 for MacOS X 10.7