Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I install FWTools in Windows7 and run FWTools Shell,after type gdal2tiles,but give error 'no module named osgeo' . enter image description here

also i installed OSGEO4W ,but another error to happen

enter image description here

share|improve this question
Your 2nd screenshot shows that you are not using "OSGEO4W Shell". Without it, some environment variables for GDAL are not loaded hence your second issue To open it, see – ThomasG77 Jan 13 at 8:02

It's simply because FWTools is so old that it does not use osgeo Python namespace as illustrated at the bottom of the GDAL Python section about import

You should install GDAL via OSGEO4W or GIS internal instead of using the outdated FWTools

share|improve this answer
Did you try manually Python by doing python, then in the command import osgeo? You need to install gdal python executables with the OSGEOW4 and also need to run the command not via the classic DOS command but through the "OSGEO4W Shell" – ThomasG77 Jan 13 at 7:48
MR Thomas,OSGeo4W also give gdal error. – mhkyazd Jan 13 at 7:50
And how did you proceed to install GDAL in OSGEO4W? How did you run gdal2tiles? Can't help without more info – ThomasG77 Jan 13 at 7:55
I use osgeo4w-setup-x86.exe for install osgeo4w,also checked gdal and gdal_python,run OSGeo4W Shell and write gdal2tiles,but error ImportError: No module named gdal – mhkyazd Jan 13 at 8:07
Did you go in "Advanced install" and installed the "gdal-python"? If not, run again the osgeo4w-setup-x86.exe and do it – ThomasG77 Jan 13 at 8:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.