当前位置:   article > 正文

训练YOLOv5模型遇到的问题及解决办法_all git commands will error until this is rectifie

all git commands will error until this is rectified.

这里写自定义目录标题

问题一

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

解决办法

在train.py文件中的import os后面加上os.environ["GIT_PYTHON_REFRESH"] = "quiet"
如下图:
在这里插入图片描述

问题二

Downloading https://ultralytics.com/assets/Arial.ttf to /…/Ultralytics/Arial.ttf…失败

解决办法

https://ultralytics.com/assets/Arial.ttf手动下载该字体添加到指定路径/......./Ultralytics/Arial.ttf...(每个人电脑不一样)

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

闽ICP备14008679号