1

i had the similar problem as GeoDjango on Windows: "Could not find the GDAL library" / "OSError: [WinError 126] The specified module could not be found" and i also applied the solution given to it. it still doesnt seem to work in my case.what could be the possible solution?

error is still the same:

OSError: [WinError 127] The specified procedure could not be found
Twinkle Arora
  • 75
  • 2
  • 4

1 Answers1

0

I have never tested this in windows, but the answer in this question (sadly not upvoted or selected so we cannot really be sure) OSError in Geodjango: [WinError 127] : The specified procedure could not be found suggests the following:

You probably have multiple Python versions and there is a conflict between them.

Try to install the GDAL on your virtualenv and ensure that the gdal202.dll is in your virtualenv context.

Also ensure that you installed the right compiled version from https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal, using pip and inside your virtualenv.

SO User: Gustavo Gonçalves

Community
  • 1
  • 1
John Moutafis
  • 22,254
  • 11
  • 68
  • 112
  • Unfortunately this doesn't solve the issue, see also my other comment on that answer as it is not clear to me what is meant with "ensure that the gdal202.dll is in your virtualenv context" – takje Oct 04 '20 at 21:46
  • @takje The "context" of the virtual environment essentially is the isolated environment within which you execute your app/code etc. (You can read a bit more on it here if you like: https://realpython.com/python-virtual-environments-a-primer/#using-virtual-environments). Search your virtual env folder and see if the `gdal202.dll` exists inside your venv. – John Moutafis Oct 04 '20 at 22:15
  • I must have messed up something somewhere. Eventually I succeeded by following this tutorial. https://www.pointsnorthgis.ca/blog/geodjango-gdal-setup-windows-10/#install-gdal-python In the end you will have a system installment of GDAL via OSgeo4W and a version in your venv, but it still requires the system version. You can't skip that step. – takje Oct 06 '20 at 15:56