我目前正試圖在我的Mac OS X(小牛)上安裝Python的MongoDB驅動程序。如何安裝PyMongo
但是當我運行
[ Dsl ~/Documents/python ] sudo easy_install pymongo
我得到以下輸出
Searching for pymongo
Best match: pymongo 2.7
Processing pymongo-2.7-py2.7-macosx-10.9-intel.egg
Removing pymongo 2.7rc1 from easy-install.pth file
Adding pymongo 2.7 to easy-install.pth file
Using /Library/Python/2.7/site-packages/pymongo-2.7-py2.7-macosx-10.9-intel.egg
Processing dependencies for pymongo
Finished processing dependencies for pymongo
我嘗試了很多不同的命令,但沒有工作。如何安裝pymongo?
感謝您的幫助
編輯:當我嘗試在Python腳本
#!/usr/bin/env python3
import pymongo
client = MongoClient()
使用它我有這樣的錯誤
Traceback (most recent call last):
File "./mongo.py", line 2, in <module>
import pymongo
ImportError: No module named 'pymongo'
似乎不是有安裝,它不工作是任何錯誤? – njzk2 2014-10-06 14:59:50
我想fireup一個終端,看看你是否可以導入PyMongo包 – 2014-10-06 15:00:27
當我嘗試使用它時,我有 ImportError:沒有名爲'pymongo'的模塊 – 2014-10-06 15:00:35