From 63f88667f723227df6b71948970e969122fccb0f Mon Sep 17 00:00:00 2001 From: jiangjiajun Date: Thu, 3 Sep 2020 01:54:32 +0000 Subject: [PATCH] add paddlepaddle version check --- paddlex/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paddlex/__init__.py b/paddlex/__init__.py index a811bf6..596a570 100644 --- a/paddlex/__init__.py +++ b/paddlex/__init__.py @@ -43,6 +43,11 @@ except: "[WARNING] pycocotools install: https://paddlex.readthedocs.io/zh_CN/develop/install.html#pycocotools" ) +import paddle +if paddle.__version__ == '0.0.0': + print("[NOTICE]\tYou are using paddlepaddle with version= 0.0.0") +elif paddle.__version__ < '1.8.4': + raise Exception("[ERROR] paddlepaddle-gpu or paddlepaddle >= 1.8.4 is required") import paddlehub as hub if hub.version.hub_version < '1.8.2': raise Exception("[ERROR] paddlehub >= 1.8.2 is required") -- GitLab