From 64eb312bf074322a0bd3d18b0dae16294a5678db Mon Sep 17 00:00:00 2001 From: wuzewu Date: Thu, 24 Dec 2020 11:44:24 +0800 Subject: [PATCH] Fix git_python import bug --- paddlehub/server/git_source.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paddlehub/server/git_source.py b/paddlehub/server/git_source.py index 18fd2b7b..4496d081 100644 --- a/paddlehub/server/git_source.py +++ b/paddlehub/server/git_source.py @@ -21,6 +21,9 @@ import sys from collections import OrderedDict from typing import List +# For some environments where git is not installed, we need to set this environment +# variable to avoid errors. +os.environ['GIT_PYTHON_REFRESH'] = 'quiet' import git from git import Repo -- GitLab