安装pip,并通过此来安装pymongo–Python mongodb驱动
1、下载pip安装包,下载地址:http://pypi.python.org/packages/source/p/pip/pip-1.0.2.tar.gz#md5=47ec6ff3f6d962696fe08d4c8264ad49
2、解压安装:
tar -zxf pip.1.0.2.tar.gz
cd pip.1.0.2
python setup.py install
3、安装pymongo驱动
pip install pymongo
4、安装指定版本的pymongo驱动
pip install pymongo==3.1.1
5、升级pymongo驱动
pip install --upgrade pymongo
参考资料:http://api.mongodb.com/python/current/installation.html