[gdal-dev] GDAL scripting with Python 2.5 (on windows)

Aleksey Naumov anaumov at gmail.com
Mon Oct 19 15:20:28 EDT 2009


Dear GDAL users,

My apologies if this is a repeated question, I searched the mail acrhives
and found a few discussions on this subject, but no resolution, AFAIK. I may
have overlooked a good thread, would appreciate a link.

My problem is being able to do scripting with GDAL using Python 2.5 (this
version is important because of integration/compatibility with a number of
other packages, mainly IPython), and I need to be able to do it on Windows.
I attempted a few approaches, but could not figure out how to get all the
pieces to work together:
   - FWTools 2.4.5; however it comes with Python 2.3, an older version
   - OSGEO4W
      - Went through the Express setup and chose GDAL (+ GRASS, QGIS).It
installed Python 2.5.2; however on "import gdal" I get error "No module
named gdal".
      - I looked through the Advanced setup and tried it a few times with
various options related to GDAL, however was not able to get it to work. Are
there specific options that should be enabled to make GDAL/Python scripting
possible in OSGEO4W?
   - Tried to "easy_install gdal", this finds GDAL 1.6.1 and puts a suitable
*.egg into C:\Python25\Lib\site-packages. But when I try to "import gdal" I
get the error stating that gdal16.dll was not found.

Is there a way to achieve this on Windows? Do I need to compile GDAL on my
windows box; if so, should I be using Cygwin or try to download MS VC++?

Thank you

Aleksey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20091019/758e8351/attachment.html


More information about the gdal-dev mailing list