当我们在第一次运行YOLOv5中的train.py程序时:可能会出现以下报错:
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 exceptionExample:
export GIT_PYTHON_REFRESH=quiet
如图:
解决方式:
在文件首行加入以下内容:
import os
os.environ["GIT_PYTHON_REFRESH"] = "quiet"