9

I have installed GDAL and checked on the command line, it is working and when I run the gdal2tiles.py on the command line it works but when I run the same file gdal2tiles.py with python IDLE, I get "No module named 'osgeo'" error. Can you assist.

1

This sounds like you have multiple python installations, and GDAL is installed on one and not the other.

Try the following (which I have based upon this). Create a text file within your python installation site packages folder C:\Python27\Lib\site-packages called usrlocal.pth. In this text file insert one line giving the path to your second python installation site packages folder which features the GDAL install, for example:

C:\OSGeo4W\apps\Python27\Lib\site-packages
  • I have done the above but now getting different error and also noticed what you mention above regarding two python (27 and 34) – Asanda Jan 31 '17 at 6:27
  • I removed the second python but still not working... – Asanda Jan 31 '17 at 7:50
3

Got the same problem. I fixed ir by installing python-gdal using synaptic with my Debian Jessie

  • 1
    Ok, but this question is for Windows OS (check tag osgeo4w). Your answer solves the problem in this OS? – aldo_tapia Sep 6 '17 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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