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
... ...