diff --git a/src/spikeinterface/exporters/to_ibl.py b/src/spikeinterface/exporters/to_ibl.py
index 3515bfe0cf..2c4aec4cd2 100644
--- a/src/spikeinterface/exporters/to_ibl.py
+++ b/src/spikeinterface/exporters/to_ibl.py
@@ -7,7 +7,6 @@
 
 import numpy as np
 import numpy.typing as npt
-from scipy.signal import welch
 from tqdm.auto import tqdm
 
 from spikeinterface.core import ChannelSparsity, SortingAnalyzer
@@ -82,6 +81,11 @@ def export_to_ibl(
 
     """
 
+    try:
+        from scipy.signal import welch
+    except ImportError as e:
+        raise ImportError("Please install scipy to use the export_to_ibl function.") from e
+
     # Output folder checks
     if isinstance(output_folder, str):
         output_folder = Path(output_folder)