2011-08-11 52 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