1. 首先安装postgresql数据库

 

yum install postgresql

yum install postgresql-server

yum install pgadmin3

yum install postgresql-contrib

 

2. 前往官网下载源代码

http://initd.org/psycopg/

 

3. 运行python setup.py install

报错

In file included from psycopg/psycopgmodule.c:27:0:
./psycopg/psycopg.h:31:22: 致命错误:libpq-fe.h:没有那个文件或目录
编译中断。

4. 补充开发包

dnf install postgresql-devel

5. 再次安装

python setup.py install

成功

 

posted on 2016-02-24 10:29  小虾ff  阅读(535)  评论(0编辑  收藏  举报