python操作postgres数据库,可使用psycopg2模块
官方地址: http://initd.org/psycopg/
下载源码编译,编译命令来自README.rst
python setup.py build
编译出错:
Error: pg_config executable not found.
Please add the directory containing pg_config to the PATH
or specify the full executable path with the option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
解决方案:
# dnf builddep python-psycopg2
... ...