So I\'m writing a python extension module in C and I\'m trying to compile it for my 64-bit Python build. After bashing my head against MinGW for a while, I did some googling
I had the same error. Installing psycopg2 from https://github.com/nwcell/psycopg2-windows solved my problem