From 073507ae2ab93d48b37141ec12d57320934d7a84 Mon Sep 17 00:00:00 2001 From: JoeZiminski Date: Wed, 26 Jun 2024 12:19:16 +0100 Subject: [PATCH] Use importlib version instead of .__version__ --- src/spikeinterface/sorters/external/kilosort4.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/spikeinterface/sorters/external/kilosort4.py b/src/spikeinterface/sorters/external/kilosort4.py index 9320022a20..65f1483348 100644 --- a/src/spikeinterface/sorters/external/kilosort4.py +++ b/src/spikeinterface/sorters/external/kilosort4.py @@ -6,7 +6,6 @@ from ..basesorter import BaseSorter from .kilosortbase import KilosortBase -from importlib.metadata import version PathType = Union[str, Path] @@ -129,7 +128,10 @@ def is_installed(cls): @classmethod def get_sorter_version(cls): """kilosort version <0.0.10 is always '4' z""" - return version("kilosort") + # Note this import clashes with version! + from importlib.metadata import version as importlib_version + + return importlib_version("kilosort") @classmethod def _setup_recording(cls, recording, sorter_output_folder, params, verbose):