2013-10-23 40 views
21

似乎Mercurial不在小牛上運行(Python 3.)任何人都可以找到解決方案。在小牛上運行Mercurial

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) 

回答

4

嘗試

$ sudo pip uninstall mercurial 

其次

$ sudo pip install mercurial 

編輯:如果沒有pipeasy_install pip首先做到。

+1

'''pip:命令未找到'''新鮮安裝。 – Shmidt

4

小牛確實安裝了python 2.7.5,所以Mercurial應該可以正常運行。你可能只需要修復或重做你的安裝,如果python的路徑改變了。

+2

是的,我剛剛重新運行安裝程序http://mercurial.berkwood.com,現在它工作正常。 – NobodyMan

21

升級到OX 10.9 Mavericks後,昨晚我有類似的問題。 注:我使用的是自制,我曾試圖 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 

因此,爲了解決我的急流問題,我跑了;

brew link --overwrite mercurial

6

這一切現在與最新的自制軟件。如果你沒有安裝Homebrew,你可以在http://brew.sh以及簡單的說明中找到它。

一旦你有自制軟件,我建議做

$ brew update 
$ brew upgrade 

要安裝的Mercurial只是做

$ brew install hg 

無痛。

+2

那麼「hg」和「mercurial」公式之間有什麼區別? –

+1

@AndrewSwan hg [別名爲mercurial公式](https://github.com/Homebrew/homebrew/blob/master/Library/Aliases/hg) – user1338062