Tuesday, February 10, 2015

Installing Python with gdal on a Windows computer

Getting a new computer gave me the chance to try again installing Python with gdal. There may be various ways, but this works for me. It can be a bit tricky to get all working, so these resources helped me a lot:

My Computer: Windows 7, 64-bit

1) Download and install Python 2.7 (the 3er versions do not support all libraries yet (?) and my code is all 2.7)

2) For installing gdal I follow these instructions. This installs both the command line gdal utilities and the python bindings to use gdal within python. I need the command line utilities also to call them with "os.system" from within python.

[A day later I realize -- the bindings from the above mentioned webpage link the command line installation to python. For some reason in my new computer I dont get this to work. Solving that quickly and being lazy: Install the Python gdal bindings from the link at point 3 below. The difference is that these bindings contain the whole gdal. BUT if you only install these, you wont have the command line utilities available]

3) At this great page, "all" libraries are available in different version, especially Windows 64-bit:
  I use it for installing additional libraries like Numpy, Pil, etc

4) I use Spyder for writing code (looks a bit like Matlab and works really great!). First install the Python GUI library "PyQt 4" from http://www.riverbankcomputing.com/software/pyqt/download and then Spyder, available here https://code.google.com/p/spyderlib/ or at http://www.lfd.uci.edu/~gohlke/pythonlibs/

[today, 1/3/2013, the 4.10 PyQt version had an issue with Spyder but that should be resolved soon in the download]






No comments:

Post a Comment

Note: Only a member of this blog may post a comment.