python操作postgresql数据库

import psycopg2
conn = psycopg2.connect(database="test", user="enniu", password="postgres", host="127.0.0.1", port="5432")

加载psycopy,出现image not found解决办法

  • Psycopg2 image not found
  • How do I run psycopg2 on El Capitan without hitting a libssl error
$ sudo ln -s /Users/enniu/anaconda/lib/libssl.1.0.0.dylib /usr/local/lib
$ sudo ln -s /Users/enniu/anaconda/lib/libcrypto.1.0.0.dylib /usr/local/lib

你可能感兴趣的:(python操作postgresql数据库)