0

I'm using linux x64 and install GDAL with easy install

sudo easy_install GDAL

Checking GDAL :

reigin@reigin-K43SA:~/pyton$ gdalinfo --version
GDAL 1.10.1, released 2013/08/26

But when i use import :

>>> import gdal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named gdal

My python path :

>>> import sys
>>> sys.path
['', '/home/reigin/miniconda2/lib/python27.zip', '/home/reigin/miniconda2/lib/python2.7', '/home/reigin/miniconda2/lib/python2.7/plat-linux2', '/home/reigin/miniconda2/lib/python2.7/lib-tk', '/home/reigin/miniconda2/lib/python2.7/lib-old', '/home/reigin/miniconda2/lib/python2.7/lib-dynload', '/home/reigin/miniconda2/lib/python2.7/site-packages', '/home/reigin/miniconda2/lib/python2.7/site-packages/setuptools-34.3.2-py2.7.egg']

I try : can't import gdal in python? and http://trac.osgeo.org/gdal/wiki/GdalOgrInPython but idk how to implement this, cz i'm new in python..

any help thanks alot..

Community
  • 1
  • 1
Budi Mulyo
  • 384
  • 5
  • 22

1 Answers1

0

Looks like you are using conda, so try using the conda installer which will also install the GDAL binaries:

conda install -c conda-forge gdal

I believe easy_install only installs the python bindings. You also need the correct C++ binaries available.

If you are importing gdal installed with conda you should import gdal like this. from osgeo import gdal

Community
  • 1
  • 1
jramm
  • 6,415
  • 4
  • 34
  • 73