Opening a postgres connection in psycopg2 causes python to crash
Question: I'm getting the following error message when I try to open up a connection to
a postgres database. Perhaps it's related to OpenSSL, but I can't understand
the error message. Can anyone help?

    
    
    >>> import psycopg2
    >>> conn = psycopg2.connect(host = '', port = , dbname
     = '', user = '', password = '')
    Auto configuration failed
    12848:error:02001015:system library:fopen:Is a directory:.\crypto\bio\bss_file.c
    :169:fopen('D:/Build/OpenSSL/openssl-1.0.1h-vc9-x64/ssl/openssl.cnf','rb')
    12848:error:2006D002:BIO routines:BIO_new_file:system lib:.\crypto\bio\bss_file.
    c:174:
    12848:error:0E078002:configuration file routines:DEF_LOAD:system lib:.\crypto\co
    nf\conf_def.c:199:
    


Answer: One problem that I can think of is that your installation may not have been
linked/built properly to use openssl. If you haven't tried the packages listed
in the docs yet, maybe you could give it a try.

When I look at the [docs](http://initd.org/psycopg/docs/install.html):

> **Microsoft Windows:**
>
> Jason Erickson maintains a packaged [Windows port of
> Psycopg](http://www.stickpeople.com/projects/python/win-psycopg/) with
> installation executable. Download. Double click. Done.

So you could try to install it from there. Or you can try the pip-friendly
windows-friendly (note: I didn't try it myself)
[psycopg2-windows](https://github.com/nwcell/psycopg2-windows) package.

