stgl/scarplet

import error from Mac

Opened this issue · 0 comments

Describe the bug
Installing scarplet works but it fails on import.

On the scarps example notebook, I've got an import error:
ImportError: dlopen(/opt/anaconda3/lib/python3.7/site-packages/osgeo/_gdal.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libgif.7.dylib
Referenced from: /opt/anaconda3/lib/libgdal.20.dylib
Reason: image not found

To Reproduce
Steps to reproduce the behavior:

  1. I installed scarplet using:

conda create -n scarplet_env
conda activate scarplet_env
conda install scarplet -c conda-forge

And installing works.

  1. I downloaded scarlet-master folders in my computer and opend example>scarps notebook.

  2. I've got an error at the second line:
    import scarplet as sl from scarplet.datasets import load_carrizo from scarplet.WindowedTemplate import Scarp

  3. See error


ImportError Traceback (most recent call last)
in
----> 1 import scarplet as sl
2 from scarplet.datasets import load_carrizo
3 from scarplet.WindowedTemplate import Scarp

/opt/anaconda3/lib/python3.7/site-packages/scarplet/init.py in
----> 1 from scarplet.core import *

/opt/anaconda3/lib/python3.7/site-packages/scarplet/core.py in
16
17 from scarplet import WindowedTemplate
---> 18 from scarplet.dem import DEMGrid
19
20

/opt/anaconda3/lib/python3.7/site-packages/scarplet/dem.py in
12
13 from copy import copy
---> 14 from osgeo import gdal, gdalconst
15
16 from rasterio.fill import fillnodata

/opt/anaconda3/lib/python3.7/site-packages/osgeo/init.py in
24 fp.close()
25 return _mod
---> 26 _gdal = swig_import_helper()
27 del swig_import_helper
28 else:

/opt/anaconda3/lib/python3.7/site-packages/osgeo/init.py in swig_import_helper()
20 if fp is not None:
21 try:
---> 22 _mod = imp.load_module('_gdal', fp, pathname, description)
23 finally:
24 fp.close()

/opt/anaconda3/lib/python3.7/imp.py in load_module(name, file, filename, details)
240 return load_dynamic(name, filename, opened_file)
241 else:
--> 242 return load_dynamic(name, filename, file)
243 elif type_ == PKG_DIRECTORY:
244 return load_package(name, filename)

/opt/anaconda3/lib/python3.7/imp.py in load_dynamic(name, path, file)
340 spec = importlib.machinery.ModuleSpec(
341 name=name, loader=loader, origin=path)
--> 342 return _load(spec)
343
344 else:

ImportError: dlopen(/opt/anaconda3/lib/python3.7/site-packages/osgeo/_gdal.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libgif.7.dylib
Referenced from: /opt/anaconda3/lib/libgdal.20.dylib
Reason: image not found

Expected behavior
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: iOS v10.12.6
  • Python Version: 3.8.1

Additional context
Add any other context about the problem here.