Only adding this because I tried using the kyng chaos tools, but on my Mac OS X machine I was able to very, very easily install this with Anaconda
conda install gdal
Posting in case anyone finds this again - I realize the original post is 3 years old.
Have you logged off or rebooted your server since setting the environment variables?
The changes only come into effect once you do this.
I often now just set these in my Python scripts manually to avoid conflicts / reliancy on Windows variables. You could try something similar in your script or IDLE:
import os
os.environ['PATH'] = "C:\\Program Files\\GDAL" + ';' + os.environ['PATH']
os.environ['GDAL_DRIVER_PATH'] = "C:\\Program Files\\GDAL\\gdalplugins"
os.environ['GDAL_DATA'] = "C:\\Program Files\\GDAL\\gdal-data"
Assuming this still fails..
The PostGIS driver requires the libpq.dll (the postgres client library). You can test the GDAL/OGR dll with depends.exe to see if it is missing.
I would have assumed it had been compiled with this as the Info Page lists the PostGIS driver. It is present in a recent MapServer download I took from the same site.
However it is worth checking, and making sure it is in your PATH variable.
After checking the Info Page again it notes GDAL was built with the postgresql-8.3.7 client library. As you are using PostgreSQL 9.04-1 this could be a problem.
In my MapServer download there is a:
gdal\plugins-optional\ogr_PG.dll
I believe this is required for using the PostGIS plugin with OGR, so moving this to your PATH could well allow you to use the driver.
As you say in your comments this does not seem to be included in the package. To resolve the issue, download a MapServer package, which does contain this file. Once I added this to the C:\Program Files\GDAL\gdalplugins folder with the exact same installs as you it worked:
Best Answer
I was in the same situation as you it sounds like - I needed to install it to use the Python 2.6.5 install with ArcGIS. Here is how I did it.
ESRI FGDB API install
Download and unzip the FGDB API from Esri at: http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api. Yes, you have to login to download it. Ver 1.1 at time of this writing, get the VS2010 version.
Unzip the FGDB API to a directory, I did mine to C:\Program Files\ESRI FileGDB API. Add the path to the bin directory (mine is C:\Program Files\ESRI FileGDB API\bin) to your
PATH
environmental variable. FileGDBAPI.dll has to be in yourPATH
.GDAL 1.9 install
Download Win32 GDAL 1.9/Mapserver binary package from http://vbkto.dyndns.org/sdk/.
Install the GDAL build by unzipping it to somewhere like C:\Program Files (x86)\GDAL.
Setup and config of GDAL and plugins:
Path to /bin needs to be in PATH env. variable (C:\Program Files (x86)\GDAL\bin) Also, so does: C:\Program Files (x86)\GDAL\bin\gdal\apps and C:\Program Files (x86)\GDAL\bin\gdal\python
Copy ogr_FileGDB.dll from C:\Program Files (x86)\GDAL\bin\gdal\plugins-external to C:\Program Files\GDAL\bin\gdal\plugins
Create new env. variable named GDAL_DRIVER_PATH with value of C:\Program Files (x86)\GDAL\bin\gdal\plugins. This will make all of your plugin dlls available as drivers to GDAL.
Test by running
ogrinfo --formats
Python 2.6.5 support
Got this error when trying to import gdal:
This is the driver for Oracle GeoRaster, which I don't need, so I moved gdal_GEOR.dll from \plugins to \plugins-optional.