This question is an exact duplicate of:

Can any one knows the error of importing GDAL?

I downloaded the binaries from Gisinternalsa! to install the GDAL library. However,I cannot import gdal successfully. The detail of error is shown in the figure.

ImportError: DLL load failed:The specified procedure could not be found.(figure 1)

I installed the binaries and core which are version of 64 bit & v.1500 from Gisinternals, that is version of the python 2.7 in my laptop. I tried to use "from osgeo import gdal", but it still didn't work. And the error massage is same with the above. (figure 2)

Then, I had uninstalled the former binaries and core and installed it again. The python shows "ImportError: No module named osgeo" or "ImportError: No module named gdal". (figure 3) So I think the reason why is there are more than one multiple python installation. Should I delete the redundant installation.

How should I do?

![enter image description here]1 __________________________________THE SOLUTION____________________________ Due to closing, I post the solution below the question. There are many method to install the GDAL library. Installing the binaries from Gisinternalsa is one of them. The vision of the binaries should be matched the vision of the python on your laptop. Moreover, you also have to add the dictionaries of the python and GDAL into environment variables. However, there are perhaps more installation of Python in the laptop. Hence, you have to add the precise dictionary. The comments below the question indicate the problems which you probably have. Nevertheless, you can use the wheel to install the GDAL. The fellowing is the steps:

  1. download the wheel from (lfd.uci.edu/~gohlke/pythonlibs/#gdal) the website has many libraries that are very useful. Find out suitable vision for the python.

  2. Open the Windows Terminal (CMD) and use cd to convert into the python Script folder.

  3. Type "pip install (the path the wheel located in)" and enter the Commands in the figure below

  4. You get it when the successful massage appears enter image description here

I hope this could help you.

marked as duplicate by user2856, mgri, lynxlynxlynx, Oto Kaláb, HDunn Oct 19 '17 at 11:28

This question was marked as an exact duplicate of an existing question.

  • Are you using 64 bit python? You must use 64 bit python with 64 bit GDAL and conversely 32 bit python with 32 bit GDAL. But before you install 64 python beware that having multiple python installs comes with its own set of problems... best that you stick with whatever bitedness your current python is. You could uninstall the wrong bit GDAL OR use the 64 bit executables in the bin, they will be able to take advantage of your available memory but only if you're using 64 bit Windows (or Linux). – Michael Stimson Oct 19 '17 at 0:28
  • Yeah, in the top of figure 2, it shows the python is 64 bit. – Mark_gis Oct 19 '17 at 0:33
  • Did you install the python bindings from GISInternals? Or OSGeo? They are a separate install. Can you confirm like stackoverflow.com/questions/1405913/… that it is running in 64 bit mode? – Michael Stimson Oct 19 '17 at 0:35
  • Try alternative network installer by NextGIS (nextgis.com/nextgis-qgis). You only need to choose GDAL in installer interface if you don't need QGIS and etc. After successfully installed, use nextgis command prompt, to use GDAL utilities and python bindings (command prompt will set on needed paths). – Dmitry Baryshnikov Oct 19 '17 at 8:04
  • Please do not re-ask the same question. – PolyGeo Oct 19 '17 at 10:54

The Python GDAL lib is just a wrapper around a C++ library, as far as I know. The first two figures mean that it cannot find the gdal dll (the core library) but your wrapper is installed.

The third has nothing installed. I would really recommend downloading the precompiled wheel at http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal it contains the gdal dll already.

  • After I had uninstalled the former, I have installed the core and binaries from gisinternals.com. But for right now, the python even cannot find out the module. In windows terminal, I command "gdalinfo --version", and then it shows "GDAL 2.2.1, released 2017/06/23". It indicate GDAL should have installed successfully. Does it work, after I get the precompiled wheel? Or I have to make it find out the module first? – Mark_gis Oct 19 '17 at 0:32
  • Just the wheel should be fine. – Lennert De Feyter Oct 19 '17 at 1:59

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