错误:已安装git并配置路径但执行briefcase new时报错如下:
Briefcase requires git, but it is not installed (or is not on your PATH)
表现:在python中输入import git会报错 ImportError: Bad git executable.
具体报错如下:
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()
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
解决灵感来自ImportError: Bad git executable错误的解决方案_KI4EVER的博客-优快云博客
解决方案:不用配置path,配置GIT_PYTHON_GIT_EXECUTABLE即可。如图
错误原因:未知