2011-08-11 40 views
0

我從OSX5升級到Python 2.6附帶的OSX6。然後我必須再次安裝pymongo才能使用Python 2.6,但我在這樣做時遇到了麻煩。當我運行easy_install或pip時,它會繼續在python 2.5目錄中安裝pymongo ...請參閱下面的終端輸出。誰能幫忙?如何爲Python 2.6安裝pymongo?謝謝!爲Python 2.6安裝pymongo時出現問題

localhost:~ $ sudo easy_install -U setuptools 
Password: 
Searching for setup tools 
Reading http://pypi.python.org/simple/setuptools/ 
Reading http://peak.telecommunity.com/snapshots/ 
Best match: setuptools 0.6c12dev-r88846 
Processing setuptools-0.6c12dev_r88846-py2.6.egg 
    setuptools 0.6c12dev-r88846 is already the active version in easy-install.pth 
Installing easy_install script to /usr/local/bin 
Installing easy_install-2.6 script to /usr/local/bin 

Using /Library/Python/2.6/site-packages/setuptools-0.6c12dev_r88846-py2.6.egg 
Processing dependencies for setuptools 
Finished processing dependencies for setuptools localhost:~ 

$ python -m easy_install pymongo 
Searching for pymongo 
Best match: pymongo 2.0 
Adding pymongo 2.0 to easy-install.pth file 

Using /Library/Python/2.5/site-packages 
Processing dependencies for pymongo 
Finished processing dependencies for pymongo 

回答

0

您需要激活Python 2.6作爲「當前」版本的Python。 This post at superuser解釋如何。

之後,您應該能夠使用easy_install

安裝pymongo