当前位置:   article > 正文

yolov5报错:ImportError:Failed to initialize: Bad git executable_raise importerror("failed to initialize: {0}".form

raise importerror("failed to initialize: {0}".format(_exc)) from _exc import

运行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()
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

原因:git没有加入环境变量
解决:添加代码

os.environ["GIT_PYTHON_REFRESH"] = "quiet"
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/507550
推荐阅读
相关标签
  

闽ICP备14008679号