MongoDB Python开发环境搭建

1. Dowload MangoDB
    http://www.mongodb.org/downloads download Mac OSX 64-bit
 
2. unpack(use Command or double click)
    tar -xvf mongodb-osx-x86_64-2.6.0 .tgz
 
3. Create db file
    sudo mkdir -p /data/db/
    sudo chown `id -u`  /data/db/
 
4. configure mongo env to .bash_profile
    MONGO_HOME=~/mongodb-osx-x86_64-2.6.0
    source .bash_profile
 
5. setup mongodb
    mongod
 
6. client
    mongo 
 
 
7. Python setuptool
 
    run at cmd
 
    it will throw error, but don’t worry, you can find the installer package setup tools-3.4.4
    enter the package 
    sudo python setup.py install
 
 8. download pymongo
 
     sudo easy_install pymongo-2.7-py2.7-macosx-10.8-intel.egg 
 
9. open  command->python try the API
 
   
 
    

相关推荐