加载模型识别是可以正常用的,但是就是训练跑不起来报错如下,大家知道怎么处理嘛
Traceback (most recent call last):
File "F:\PY\envs\yolov5\lib\site-packages\git_init.py", line 140, in
refresh()
File "F:\PY\envs\yolov5\lib\site-packages\git_init.py", line 127, in refresh
if not Git.refresh(path=path):
File "F:\PY\envs\yolov5\lib\site-packages\git\cmd.py", line 455, in refresh
raise ImportError(err)
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 message 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|silent|none|n|0: for no message or exception
- warn|w|warning|log|l|1: for a warning message (logged at level CRITICAL, displayed by default)
- error|e|exception|raise|r|2: for a raised exception
Example:
export GIT_PYTHON_REFRESH=quiet
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\yolov5-master\train.py", line 72, in
GIT_INFO = check_git_info()
File "F:\PY\envs\yolov5\lib\contextlib.py", line 75, in inner
return func(*args, **kwds)
File "C:\Users\Administrator\Desktop\yolov5-master\utils\general.py", line 370, in check_git_info
import git
File "F:\PY\envs\yolov5\lib\site-packages\git_init_.py", line 142, in
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()
All git commands will error until this is rectified.
This initial message 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|silent|none|n|0: for no message or exception
- warn|w|warning|log|l|1: for a warning message (logged at level CRITICAL, displayed by default)
- error|e|exception|raise|r|2: for a raised exception
Example:
export GIT_PYTHON_REFRESH=quiet
进程已结束,退出代码为 1