美文网首页
搭建psycopg2开发环境

搭建psycopg2开发环境

作者: 大明白 | 来源:发表于2015-06-17 11:25 被阅读66次

    环境准备

    sudo apt-get install python-virtualenv
    virtualenv --no-site-packages --python=python2.7 sentuSrv
    cd sentuSrv
    source bin/activate
    
    sudo apt-get install libpq-dev python-dev
    pip install tornado
    easy_install psycopg2
    

    psycopg2包装类

    git clone https://github.com/FSX/momoko.git
    python setup.py install
        
    export MOMOKO_TEST_DB='exampledb'
    export MOMOKO_TEST_USER='dbuser'
    export MOMOKO_TEST_PASSWORD='qq'
    export MOMOKO_TEST_HOST='192.168.1.102'
    export MOMOKO_TEST_PORT='5432'
    
    python setup.py test
    

    相关文章

      网友评论

          本文标题:搭建psycopg2开发环境

          本文链接:https://www.haomeiwen.com/subject/inrsqttx.html