diff --git a/src/erlab/io/igor.py b/src/erlab/io/igor.py index 5a322fc1..c50d6449 100644 --- a/src/erlab/io/igor.py +++ b/src/erlab/io/igor.py @@ -4,9 +4,19 @@ import numpy as np import xarray as xr -import igor2.binarywave -import igor2.packed -import igor2.record +try: + import igor2.binarywave + import igor2.packed + import igor2.record + +except ImportError: + import warnings + + warnings.warn( + "igor2 is not installed. Some functions may not work.", + ImportWarning, + stacklevel=1, + ) __all__ = ["load_experiment", "load_h5", "load_wave", "load_pxp", "load_ibw"]