CentOS平台下为Python添加MongoDB支持PyMongo
- 下载PyMongo
[root@leezhen ~]# wget https://pypi.python.org/packages/source/p/pymongo/pymongo-2.6.3.tar.gz
-
解压PyMongo
[root@leezhen ~]# tar zxvf pymongo-2.6.3.tar.gz
- 进入PyMongo目录
[root@leezhen ~]# cd pymongo-2.6.3
- 安装PyMongo
[root@leezhen pymongo-2.6.3]# python setup.py install
- 测试PyMongo是否安装成功
[root@leezhen pymongo-2.6.3]# python Python 2.7.6 (default, Mar 10 2014, 12:36:38) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pymongo >>> exit() [root@leezhen pymongo-2.6.3]#