Here’s what worked for me.
- Download and install MinGW.
- Add x:\mingw\bin to your PATH. (Right click My Computer | Advanced tab | Environment Variables | Select ‘Path’ from the ‘System variables’ list | Edit | Append ‘;x:\mingw\bin’ to the end of the string in ‘Variable value’)
- Download and execute the PostgreSQL one-click installer.
- Download and extract psycopg2
- From within the extracted psycopg2 directory, execute the following command:
python setup.py build_ext --compiler=mingw32 build
Your goodies will be in the local build directory.
Final step:
python setup.py build_ext –compiler=mingw32 install
Posted by Shaman Hack on August 6th, 2009.