当前位置:   article > 正文

潇洒郎:gitpython 学习-解决Bad git executable, export GIT_PYTHON_REFRESH=quiet问题

export git_python_refresh=quiet

错误如下:

  1. ImportError: Failed to initialize: Bad git executable.
  2. The git executable must be specified in one of the following ways:
  3. - be included in your $PATH
  4. - be set via $GIT_PYTHON_GIT_EXECUTABLE
  5. - explicitly set via git.refresh()
  6. All git commands will error until this is rectified.
  7. This initial warning can be silenced or aggravated in the future by setting the
  8. $GIT_PYTHON_REFRESH environment variable. Use one of the following values:
  9. - quiet|q|silence|s|none|n|0: for no warning or exception
  10. - warn|w|warning|1: for a printed warning
  11. - error|e|raise|r|2: for a raised exception
  12. Example:
  13. export GIT_PYTHON_REFRESH=quiet

错误原因: 无法找到git.exe

解决办法:寻找git.exe, 然后给git.exe 添加环境变量,重启电脑

寻找git——打开git-bash , 输入where git  

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

闽ICP备14008679号