I installed gdal from this link: http://www.gisinternals.com/query.html?content=filelist&file=release-1911-x64-gdal-3-0-0-mapserver-7-4-0.zip When I use the the following command from this environment and location:

**(base) C:\Users\Ibrahim Khalilullah>**from osgeo import gdal it gives the following error:

Traceback (most recent call last): File "", line 1, in File "C:\ProgramData\Anaconda3\lib\site-packages\osgeo__init__.py", line 21, in _gdal = swig_import_helper() File "C:\ProgramData\Anaconda3\lib\site-packages\osgeo__init__.py", line 17, in swig_import_helper _mod = imp.load_module('_gdal', fp, pathname, description) File "C:\ProgramData\Anaconda3\lib\imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "C:\ProgramData\Anaconda3\lib\imp.py", line 342, in load_dynamic return _load(spec) ImportError: DLL load failed: The specified procedure could not be found.

But it successfully import if I use the following location: **(base) C:\Program Files\GDAL>**from osgeo import gdal

How can I solve this issue? I want to use the first location for my conda environment.

  • I believe the most straightforward way to install gdal having Anaconda its just running conda install gdal in your environment. Jun 17, 2019 at 13:36
  • @Marcelo Villa thanks for your comment. I tried using conda but failed.
    – Learning
    Jun 17, 2019 at 15:01
  • How does it fail? Jun 17, 2019 at 15:20
  • Create a fresh environment then install from conda-forge with conda install gdal -c conda-forge
    – mikewatt
    Jun 17, 2019 at 17:41
  • @mikewatt thanks for your comment. How can I create a fresh environment?
    – Learning
    Jun 17, 2019 at 21:24


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.