在Mavericks上运行Mercurial

21

看起来Mercurial在Mavericks(Python 3)上无法运行。有人找到解决方案了吗?

abort: couldn't find mercurial libraries in [
    /Library/Python/2.7/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)
7个回答

22

昨晚我在升级到OS X 10.9 Mavericks后遇到了类似的问题。 注意:我使用homebrew,我已经尝试过brew install hgbrew update,但它们没有起作用,由于每个人的系统不同,我建议运行brew doctor来查看您的特定问题,在我的情况下,我有以下问题;

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these: mercurial

为了解决我的mercurial问题,我运行了;

brew link --overwrite mercurial


我升级到了 macOS Montery,这帮助我解决了我的 hg 问题。 - Ethan Long

6
现在最新的Homebrew已经可以正常使用了。如果您还没有安装Homebrew,可以在http://brew.sh找到它,并获得简单的安装指南。
一旦您安装好了Homebrew,我建议执行以下操作:
$ brew update
$ brew upgrade

要安装Mercurial只需执行以下操作:
$ brew install hg

无痛的。

2
那么“hg”和“mercurial”配方之间有什么区别呢? - Andrew Swan
1
@AndrewSwan hg 是 mercurial formula 的别名 - user1338062

4

尝试

$ sudo pip uninstall mercurial

跟随着
$ sudo pip install mercurial

编辑:如果您没有pip,请先安装easy_install pip


4

Mavericks搭载了Python 2.7.5,因此Mercurial应该能够正常运行。如果Python的路径发生了变化,您可能需要修复或重新安装。


2
是的,我刚刚重新运行了安装程序http://mercurial.berkwood.com,并且现在它正常工作。 - NobodyMan

3

1

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接