Is there a difference between the python-binaries with the gdal-core-setup and the libraries within the zip-files?

I used the zip-files due to the rights-management on my desktop-computer.

But please read for yourself:

I use following setup: Python 2.7.10, 32bit, compiled with MSCV 1500; Windows 7 64 enter image description here

According to this I downloaded the following zip-file from gisinternals.com:


I unzipped it and set all the environment variables according to Mr Szekeres' description:

SET "PATH=%SDK_ROOT%bin;%SDK_ROOT%bin\gdal\python\osgeo;%SDK_ROOT%bin\proj\apps;%SDK_ROOT%bin\gdal\apps;%SDK_ROOT%bin\ms\apps;%SDK_ROOT%bin\gdal\csharp;%SDK_ROOT%bin\ms\csharp;%SDK_ROOT%bin\curl;%PATH%"
SET "GDAL_DATA=%SDK_ROOT%bin\gdal-data"`
SET "GDAL_DRIVER_PATH=%SDK_ROOT%bin\gdal\plugins"
SET "PYTHONPATH=%SDK_ROOT%bin\gdal\python;%SDK_ROOT%bin\ms\python"

Please note, that %SDK_ROOT% is C:\Python27\GDAL in my environment

With this setup, Iam able to successfully run ogr/gdal-commands via windows-cmd, f.e.: enter image description here

Unfortunately I cannot use the tools within python: enter image description here

I had a look into the mentioned __init_.py file within the osgeo-python-bindings. There I checked, that the imp.find_module()-function is able to find the given '_gdal'-module and delivers back file, pathname and description as stated in the python docs

But when calling the the imp.load_module with this parameters the error occurs. It doesn't matter if I start python via cmd or via Idle.

Any idea what could be still wrong?

1 Answer 1


So I finally found a workaround:

After unzipping and hardwiring the the matching release-1500-gdal-2-1-2-mapserver-7-0-2.zip as described above I additionally installed the following file from gisinternals.com as well:


These are additional Python-bindings for GDAL and luckily the installation process didn't required any administrative rights.

After the installation I had the bindings installed twice and had to make sure, python is looking only for the new ones, I just installed.

So either delete %SDK_ROOT%bin\gdal\python;%SDK_ROOT%bin\ms\python from PYTHONPATH-variable or just delete/rename the __init__.py file in this paths.

The new bindings seem to match the versions better and python is now ready to to run with gdal/ogr:enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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