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萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章