2014-09-24 76 views
2

我使用OSX(最新版本,10.9.5),一個新的Macbook Pro。試圖用BREW安裝python:使用brew安裝python後,我得到一個錯誤與點

$ brew install python 
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/python-2.7.8_1.mavericks.bottle.2.tar.gz 
Already downloaded: /Library/Caches/Homebrew/python-2.7.8_1.mavericks.bottle.2.tar.gz 
==> Pouring python-2.7.8_1.mavericks.bottle.2.tar.gz 
==> Caveats 
Setuptools and Pip have been installed. To update them 
    pip install --upgrade setuptools 
    pip install --upgrade pip 

You can install Python packages with 
    pip install <package> 

They will install into the site-package directory 
    /usr/local/lib/python2.7/site-packages 
Press ENTER or type command to continue 


See: https://github.com/Homebrew/homebrew/wiki/Homebrew-and-Python 

.app bundles were installed. 
Run `brew linkapps` to symlink these to /Applications. 
Press ENTER or type command to continue 

==> /usr/local/Cellar/python/2.7.8_1/bin/python -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/2.7.8_1/bin --install-lib=/usr/local/lib/python2.7/site-packa 
==> /usr/local/Cellar/python/2.7.8_1/bin/python -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/2.7.8_1/bin --install-lib=/usr/local/lib/python2.7/site-packa 
==> Summary 
    /usr/local/Cellar/python/2.7.8_1: 4776 files, 76M 

然後我嘗試運行PIP,並得到一個錯誤:

$ pip list 
Traceback (most recent call last): 
    File "/usr/local/bin/pip", line 5, in <module> 
    from pkg_resources import load_entry_point 
ImportError: No module named pkg_resources 
+1

嘗試'哪個pip' – dawg 2014-09-24 02:57:38

回答

0

您是否嘗試過用easy_install的安裝點子?像這樣:

$sudo easy_install pip 
... 
$pip -V 
$pip 1.5.6 from /Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg (python 2.7) 

這應該工作(我試過了,它可以在我的MacBook上使用)。 希望它有幫助!