I have found a lot of questions similar to this on stackoverflow. The most relevant is Unable to install Python and GDAL (DLL load failed).
I followed the steps in the accepted answer to that question and also steps from the other replies. I uninstalled and reinstalled the proper versions and checked the environment variables multiple times. I've also placed 'C:\Program Files (x86)\GDAL' at the beginning of my Path variable.
Here is an example of the error I get (running Windows 7): Screenshot of error message
I downloaded and installed "gdal-201-1500-core.msi" from the GISinternals website which is the correct GDAL version for my installed python version, and then I installed "GDAL-2.1.0.win32-py2.7.msi" for the python bindings.
After installation, I added the system variables.
GDAL_DATA = C:\Program Files (x86)\GDAL\gdal-data
GDAL_DRIVER_PATH = C:\Program Files (x86)\GDAL\gdalplugins
Path = C:\Program Files (x86)\GDAL; etc...
I verified that the GDAL data folder is indeed named "gdal-data" and not "gdal_data". I placed GDAL at the beginning of the Path variable. GDAL works in the command prompt. The command gdalinfo --version
provides the proper version information. The same command also works in IPython. However, when I try to import osgeo, it fails as in the picture above. The 'osgeo' module is listed as being present when help("modules")
is entered in iPython.
I found another potential solution (I can't provide the website due to the link limit). It recommended installing a "dependency walker" program. I ran the program and opened C:\Program Files (x86)\GDAL\gdalwarp.exe and it came up with the following errors: dependency walker info
In a nutshell, GDAL works on my computer but I can't import osgeo into Python. From the dependency walker program, it looks like I might be missing 'L1-1-0.DLL'. Maybe this is the problem?