Markus,<br><br>Thank you for your detailed help and reference to the previous discussion on switching to the GDAL 1.6 environment (gdal16.bat). I mostly got OSGeo4W to work for me, thanks to comment from Ivan, just have some issues with ECW and MrSID support.<br>
<br>Thanks for the pointer to use "from osgeo import gdal" instead of "import gdal". you are right, that was not my problem (the problem was, in fact, missing gdal-python bindings package), but it is good to know, I fixed my scripts to use the "osgeo" namespace.<br>
<br>I probably will not venture into setting the OSGeo4W python to be the default on my system (have to careful with ESRI products and some other things), but thank you for the pointers. I'll look at them for info.<br>
<br>Take care,<br><br>Aleksey<br><br><br><div class="gmail_quote">On Mon, Oct 19, 2009 at 11:01 PM, Markus Reinhold <span dir="ltr"><<a href="mailto:markus.reinhold@uni-jena.de">markus.reinhold@uni-jena.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hej,<br>
<div class="im"><br>
<br>
Aleksey Naumov-2 wrote:<br>
><br>
> My problem is being able to do scripting with GDAL using Python 2.5 (this<br>
> version is important because of integration/compatibility with a number of<br>
> other packages, mainly IPython), and I need to be able to do it on<br>
> Windows.<br>
> I attempted a few approaches, but could not figure out how to get all the<br>
> pieces to work together:<br>
><br>
<br>
</div>first things first: It is definitely possible to use the GDAL Python 1.6<br>
bindings on Python 2.5 under Windows, cause<br>
<a href="http://www.box.net/shared/pp82vkdp8j" target="_blank">http://www.box.net/shared/pp82vkdp8j</a> that's what I'm running over here as<br>
well. Now I can't give a detailed installation instruction as it was a<br>
piecewise work, but following is what I can recall:<br>
1) I'm using the installer from OSGeo4W to setup my geospatial toolbox.<br>
Using the advanced installation process the packages I'm considering<br>
important are python, gdal (or gdal16), gdal-python (or gdal16-python),<br>
python-numpy and python-win32. The latter two I'm not sure how essential<br>
they really are, I have them installed in any way.<br>
2) To use version 1.6 of GDAL it is necessary to a) install the<br>
corresponding packages (see above) and b) switch to the 1.6 environment<br>
using gdal16.bat under osgeo4w\bin\gdal16.bat. However this works for the<br>
OSGeo4W shell only and is not applied system-wide. See<br>
<a href="http://n2.nabble.com/Python-1-6-bindings-under-Windows-td3337254.html" target="_blank">http://n2.nabble.com/Python-1-6-bindings-under-Windows-td3337254.html</a> my<br>
conversation with the list on this matter a few weeks ago. I've adjusted<br>
the %PYTHONPATH% to<br>
*C:\OSGeo4W\apps\gdal-16\pymod;C:\OSGeo4W\apps\Python25\Lib* on my system to<br>
use gdal16 system-wide.<br>
3) A minor thing. When importing the bindings I use *from osgeo import gdal*<br>
instead of *import gdal*. However that does not seem to be your problem as<br>
the latter alternative should give you a deprecation warning but not refuse<br>
to work altogether.<br>
4) The Python version of OSGeo4W is the default one on my system. It works<br>
fine, I only had a few problems when installing third-party extensions that<br>
need correct registry settings for the installation. Have a look a<br>
<a href="http://effbot.org/zone/python-register.htm" target="_blank">http://effbot.org/zone/python-register.htm</a> this script (and especially the<br>
last comment) on how to fix this problem.<br>
That's all what I can think of now. Maybe there's something you can look at<br>
to find a solution for your problems.<br>
Regards,<br>
Markus<br>
<br>
<br>
-----<br>
--<br>
<br>
********************************************************<br>
Dipl.-Kartograph Markus Reinhold<br>
<br>
Chair of Geoinformatics, Geohydrology and Modeling<br>
Friedrich-Schiller-University Jena<br>
Löbdergraben 32<br>
D - 07743 Jena<br>
Germany<br>
<br>
Phone.: (+49)(0)3641 / 9 488 65<br>
E-Mail: <a href="mailto:markus.reinhold@uni-jena.de">markus.reinhold@uni-jena.de</a><br>
********************************************************<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n2.nabble.com/GDAL-scripting-with-Python-2-5-on-windows-tp3851288p3856494.html" target="_blank">http://n2.nabble.com/GDAL-scripting-with-Python-2-5-on-windows-tp3851288p3856494.html</a><br>
Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br>