python – Import error in conda environment for GDAL

I am trying to install GDAL==2.2.2 in a conda environment. But I get the following error for some reason:

from osgeo import gdal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/hug180/.local/lib/python3.6/site-packages/osgeo/__init__.py", line 21, in <module>
    _gdal = swig_import_helper()
  File "/home/hug180/.local/lib/python3.6/site-packages/osgeo/__init__.py", line 17, in swig_import_helper
    _mod = imp.load_module('_gdal', fp, pathname, description)
  File "/home/hug180/miniconda3/envs/awra_test/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/home/hug180/miniconda3/envs/awra_test/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: libimf.so: cannot open shared object file: No such file or directory

libimf seems to be math library for intel compilers. I don’t understand this error. No where in /usr/lib or any conda environment lib directories can I find libimf.so.

Read more here: Source link