下载驱动包:
https://pypi.org/project/pymongo/
解压: tar zxvf pymongo-3.8.0.tar.gz
安装: python setup.py install
测试python环境中与monogdb的交互。
from pymongo import MongoClient client = MongoClient("localhost",40000) db=client.test for i in xrange(2000000): val=dict(val=str(i)) db.yql.insert(val)