运行train.py
报错
错误:
raise ImportError("Failed to initialize: {0}".format(exc)) from exc
ImportError: Failed to initialize: Bad git executable.
The git executable must be specified in one of the following ways:
- be included in your $PATH
- be set via $GIT_PYTHON_GIT_EXECUTABLE
- explicitly set via git.refresh()
原因:git没有加入环境变量
解决:添加代码
os.environ["GIT_PYTHON_REFRESH"] = "quiet"