From 224e0b33477191a643f8e82719d516a8452467a9 Mon Sep 17 00:00:00 2001 From: Alessandro Felder Date: Fri, 14 Jul 2023 11:41:13 +0100 Subject: [PATCH] possible fix for mac error (#200) --- src/cellfinder_core/__init__.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/cellfinder_core/__init__.py b/src/cellfinder_core/__init__.py index e0b2b8e7..746b2d2b 100644 --- a/src/cellfinder_core/__init__.py +++ b/src/cellfinder_core/__init__.py @@ -10,12 +10,15 @@ try: TF_VERSION = version("tensorflow") except PackageNotFoundError as e: - raise PackageNotFoundError( - f"cellfinder tools cannot be invoked without tensorflow. " - f"Please install tensorflow into your environment to use cellfinder tools. " - f"For more information, please see " - f"https://github.com/brainglobe/brainglobe-meta#readme." - ) from e + try: + TF_VERSION = version("tensorflow-macos") + except PackageNotFoundError as e: + raise PackageNotFoundError( + f"cellfinder tools cannot be invoked without tensorflow. " + f"Please install tensorflow into your environment to use cellfinder tools. " + f"For more information, please see " + f"https://github.com/brainglobe/brainglobe-meta#readme." + ) from e __author__ = "Adam Tyson, Christian Niedworok, Charly Rousseau" __license__ = "BSD-3-Clause"