<div dir="ltr">Dear Thomas,<br><br>Thanks for your information. yes, it really worked from OSGeo4W command shell.<br><br>I also tried to import gdal from Python idle. I set Path environment variable to "C:\OSGeo4W64\bin" and PYTHONPATH variable to "C:\OSGeo4W64\apps\Python27". But could not import the gdal from Python idle.<br><br>Thank you so much.<br>Max<br><div><font face="times new roman, serif"><br></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 24, 2015 at 11:54 PM, Thomas Juntunen <span dir="ltr"><<a href="mailto:junt0015@umn.edu" target="_blank">junt0015@umn.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><div class="h5">On Fri, Apr 24, 2015 at 9:34 AM, Max Andela <span dir="ltr"><<a href="mailto:andelamax38@gmail.com" target="_blank">andelamax38@gmail.com</a>></span> wrote:<br></div></div><div class="gmail_quote"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear OSGeo4W Developers and Users:<br><br>I have installed Python 2.7 and Osgeo4w in my PC. <br><br>The gdal is inside Osgeo4w installation. How can I import that gdal from Python?<br><br>I hope somebody can help me.<br></div></blockquote></div></div><div><br><div class="gmail_default" style="font-family:times new roman,serif;font-size:small;display:inline">Max,<br><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:small;display:inline">In your Start menu you should find OSGeo4W and under that an icon that launches an OSGeo4W command shell with the environment set such you can now access GDAL from python. Click it and it will open a shell window, at the prompt launch python and in the interpreter you can do:<br><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:small;display:inline">from osgeo import gdal<br><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:small;display:inline">You can also execute python scripts from the shell window. If you want to do this from an ordinary DOS prompt window, you'll need to modify your system environment similarly to how OSGeo4W does it. Look at their .bat files to see how to set your PATH and PYTHONPATH and whatever else you might need.<br><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:small;display:inline">HTH,<br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:small;display:inline">Thomas</div><span class="HOEnZb"><font color="#888888"> </font></span></div></div><span class="HOEnZb"><font color="#888888">-- <br><div><i><font face="georgia, serif" color="#999999">The right coordinate system can turn an impossible problem into two really hard problems. -- Charlie Pellerin</font></i><div><i><font color="#999999"><br></font></i><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><font color="#999999">Thomas Juntunen</font></span><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><font color="#999999">GIS Specialist</font></span></div><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><font color="#999999">Polar Geospatial Center<br>R280 Learning and Environmental Science<br>1954 Buford Ave<br>University of Minnesota<br>St. Paul, MN 55108<br><a>612-626-0505</a></font></span></div></div></div></div>
</font></span></div></div>
</blockquote></div><br></div>