From 9c6ae63a992c4d267855f0dbfe319c77cc9f4a20 Mon Sep 17 00:00:00 2001 From: He Sichao <1310722434@qq.com> Date: Mon, 6 May 2024 19:46:24 +0800 Subject: [PATCH] Update dependency_check.py --- brainpy/_src/dependency_check.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/brainpy/_src/dependency_check.py b/brainpy/_src/dependency_check.py index a685781b..8b4c575d 100644 --- a/brainpy/_src/dependency_check.py +++ b/brainpy/_src/dependency_check.py @@ -57,9 +57,11 @@ def import_taichi(error_if_not_found=True): if taichi is None: return None - if taichi.__version__ < _minimal_taichi_version: - raise RuntimeError(taichi_install_info) - return taichi + if taichi.__version__[0] >= _minimal_taichi_version[0] and taichi.__version__[1] >= _minimal_taichi_version[1] and \ + taichi.__version__[2] >= _minimal_taichi_version[2]: + return taichi + else: + raise ModuleNotFoundError(taichi_install_info) def raise_taichi_not_found(*args, **kwargs):