0

I am trying to import Python packages that I had previously installed but I keep getting this error when trying to import it

"ImportError: No module named gdal"

In the images attached (in the link :P) you can see that the package python-gdal and python-numpy are installed. I am also attaching the python output.

enter image description here enter image description here

P.S = I am using Ubuntu and running python from the terminal.

kylieCatt
  • 10,672
  • 5
  • 43
  • 51
lets_try
  • 15
  • 1
  • 6
  • Please consider posting the output of terminal as text inside the question. Do you have `pip` installed? If yes, can you also post the result of `pip list`? – bagrat May 22 '15 at 12:24
  • Please post your outputs as text. Try `Ctrl + Shift + C` to copy from terminal or use middle mouse button. – myaut May 22 '15 at 12:25
  • Also check generic instructions for troubleshooting Python module importing issues: http://stackoverflow.com/questions/29783849/how-to-get-more-diagnostic-output-on-a-no-module-named-xyz-error? – Mikko Ohtamaa May 22 '15 at 12:26
  • http://stackoverflow.com/questions/1538725/cant-import-gdal-in-python might be helpful for you – ha9u63a7 May 22 '15 at 12:26
  • Try sudo apt-get install python-gdal then try again importing. – Manish Gupta May 22 '15 at 12:27

1 Answers1

3

You have possibly installed a non-Ubuntu version of Python - Anaconda - yet these packages are installed into the system Python. You should probably remove Anaconda, and/or run the system Python explicitly as /usr/bin/python.

  • Yes, you were absolutely right !!! :D .. I was running a miniconda version and after un-installing it, the import worked fine .. Thank You !!! – lets_try May 23 '15 at 05:22