1

I am trying to install GDAL for python on a Windows XP machine (Python 2.6 currently installed) following the instructions at http://trac.osgeo.org/gdal/wiki/GdalOgrInPython (as is mirrored in a hundred other places). It says I need both the GDAL source (or Windows binary) and the python bindings. The python binding are be downloaded from the python cheeseshop (http://pypi.python.org/pypi/Python_GDAL/1.3.1). I don't see a download link on this page nor can I locate the python binding elsewhere - all instruction I can find seem to point to the same cheeseshop page. This seems like I'm either missing something embarrassingly simple or the bindings file has disappeared. Any thoughts on which it is? Thanks.

Nate
  • 768
  • 3
  • 9
  • 17
  • There's an answer to this question at the GIS Stackexchange. http://gis.stackexchange.com/a/2279/292 – R.K. Jan 19 '12 at 04:28

6 Answers6

1

if python 2.6 is not a pre-requisite the smoothest route to gdal+python is via OSGeo4W.

To install gdal 1.6 and pythone 2.5 run the setup program, choose Advanced, then select the shell, gdal16 and gdal16-python packages (the gdal 1.7 python package is not yet available).

Start the shell, run gdal16.bat (it will be in PATH) and you're ready.

matt wilkie
  • 17,268
  • 24
  • 80
  • 115
1

Here is the website: http://pypi.python.org/pypi/GDAL/1.6.0#downloads

Just run the .exe for the python version installed on your computer.

Mehmet
  • 11
  • 1
0

This is a shameless plug, but you might want to check out my answer in this question:

Unable to install Python and GDAL (DLL load failed)

Community
  • 1
  • 1
avee
  • 766
  • 1
  • 13
  • 22
0

The latest GDAL for python seems to be 1.7, (http://pypi.python.org/pypi/GDAL/1.7.1) but contrary to what is says earlier on the cheeseshop page, there''s no windows installer version. At the very bottom, there's a tar.gz file with the code in it.

There IS a windows installer program for version 1.6. I don't know if that version runs with python 2.6, though. I found one source that said as of Feb. 2009, it didn't, but a later note at ucsb.pbworks.com/Using-GDAL-with-Python indicates it does. I've verified it intalls fine, and I can import it per directions on that page. I haven't done anything more yet.

Hope this helps!

ViennaMike
  • 16
  • 1
  • Thanks for the help. I never did get it going. I tried to pull together the previous version as mentioned, and it looks like the binding are somewhere in packages linked to in the other response, but I never could get it to play. I ended up skipping python for this project for now. Just wanted to follow up. – Nate Jun 16 '10 at 15:48
0

For windows:

  1. run python from cmd and find your version
  2. go to http://www.gisinternals.com/release.php and download core components + bindings
  3. Add core components installation dir to environment's Path (it's been defaulted to C:\Program Files\GDAL for me)

    1. For windows:
  4. run python from cmd and find your version

  5. go to http://www.gisinternals.com/release.php and download core components + bindings
  6. Add core components installation dir to environment's Path (it's been defaulted to C:\Program Files\GDAL for me)
  7. add a new system environment 'GDAL_DATA' with 'C:\Program Files\GDAL\data' as value
  8. add 'from osgeo import gdal' in your code
Oyiwai
  • 449
  • 1
  • 3
  • 20