コスギデンサン >> 情報系メモ >> Python

Pythonインストール 2017/4
Version 3.6.1 on CentOS7
ドライバーにPsycopg2を使用する。

PSYCOPG2のインストール
# pip3.6 install -U pip
# pip3.6 install psycopg2

接続確認
import psycopg2

constr = "host=localhost port=5432 dbname=dbname user=user password=password"
conn = psycopg2.connect(constr)

conn.close();