ImportError: 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()
All git commands will error until this is rectified.
This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
- quiet|q|silence|s|none|n|0: for no warning or exception
- warn|w|warning|1: for a printed warning
- error|e|raise|r|2: for a raised exception
Example:
export GIT_PYTHON_REFRESH=quiet
报错解决办法
在from git.types import PathLike前面,import os 后面添加了一行文章来源:https://www.toymoban.com/news/detail-519084.html
os.environ["GIT_PYTHON_REFRESH"] = "quiet"
就到你的报错文件上面找文章来源地址https://www.toymoban.com/news/detail-519084.html
到了这里,关于ImportError: Bad git executable错误解决的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!