diff --git a/paddlehub/server/git_source.py b/paddlehub/server/git_source.py index 18fd2b7b825378e766a9a3ddb730d86383f84d9e..4496d081fef2bc53c574f79641d741a8402c608c 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