python操作postgre数据库



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

... ...

发布了65 篇原创文章 · 获赞 58 · 访问量 33万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章