[GIS] GDAL ImportError: DLL load failed: The specified module could not be found

anacondagdalgeopandasimporterrorjupyter notebook

I'm running Python 3.5.4 on Anaconda and i'm trying to install geopandas. I've followed the instructions to install geopandas here –
http://geoffboeing.com/2014/09/using-geopandas-windows/ – but whichever way i try i get the same error.
I've looked at many pages on gis.stackexchange and other sites that seem to have similar error messages, but none of them had the exact same error message, and no solutions worked for me. I've set up the Path environment variable, C:\Users\joseph.mabe\AppData\Local\Continuum\anaconda3\Lib\site-packages\osgeo; but to no avail.

I wondered if my use of Jupyter was part of the issue?

picture of importerror

Best Answer

I had the same exact problem. I fixed it by:

  1. Uninstalling Anaconda and reinstalling, making sure the "Add anaconda to PATH" option was ticked.
  2. Installing geopandas with conda install -c conda-forge geopandas
  3. Uninstalling GDAL with pip uninstall gdal
  4. Installing the GDAL wheels from https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal (follow the instructions on the website in your question concerning python and windows version). In my case: pip install GDAL-2.2.4-cp36-cp36m-win_amd64.whl

I do get a DeprecationWarning: DeprecationWarning: gdal.py was placed in a namespace, it is now available as osgeo.gdal, but otherwise it runs without problems in the Jupyter Notebook.