1

I work on an internal network (i.e. I can't get the latest 1.11 stuff) and have GDAL 1.9.2 set up on a Red Hat Linux Enterprise Server 6. My Linux box has python 2.6.6 however the Python binding I received in the swig directory appears to be for either Python 2.7.5 or Python 3.2.

I ran the setup.py but when I try to import OSGEO or GDAL I get this message.

Traceback (most recent call last):
    File "<stdin>:, line 1, in <module>
    File "osgeo/__init__.py", line 21 in <module>
        _gdal = swig_import_helper()
    File "osgeo/__init__.py", line 13, in swig_import_helper
        import _gdal
ImportError: No module named _gdal

Anyone got a link to the proper Python module or know of how I can get this to work. Got a lot of raster data that needs ripping apart.

1

Try adding the gdal library to the PYTHONPATH environement variable. You can find some useful instructions for installing GDAL and python in this link

http://www.gis.usu.edu/~chrisg/python/2009/

Questions similar to this have already answered in stackoverflow https://stackoverflow.com/questions/1538725/cant-import-gdal-in-python https://stackoverflow.com/questions/35500176/importerror-no-module-named-gdal

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.