From 29a91f30a7465c3254c56720e4d6ec2de34ace60 Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Sun, 30 Aug 2020 11:59:29 +0800 Subject: [PATCH] fix python path in export_serving_model.py (#1294) --- tools/export_serving_model.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/export_serving_model.py b/tools/export_serving_model.py index 1406d81d0..6050e785c 100644 --- a/tools/export_serving_model.py +++ b/tools/export_serving_model.py @@ -16,7 +16,11 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function -import os +import os, sys +# add python path of PadleDetection to sys.path +parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2))) +if parent_path not in sys.path: + sys.path.append(parent_path) from paddle import fluid -- GitLab