Unverified 提交 75feeb79 authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

YOLOv5 PyTorch Hub models >> check_requirements() (#2591)

Prints 'Please restart runtime or rerun command for update to take effect.' following package auto-install to inform users to restart/rerun.
上级 8ace1b1b
...@@ -100,6 +100,7 @@ def check_requirements(file='requirements.txt', exclude=()): ...@@ -100,6 +100,7 @@ def check_requirements(file='requirements.txt', exclude=()):
except Exception as e: # DistributionNotFound or VersionConflict if requirements not met except Exception as e: # DistributionNotFound or VersionConflict if requirements not met
print(f"{prefix} {e.req} not found and is required by YOLOv5, attempting auto-install...") print(f"{prefix} {e.req} not found and is required by YOLOv5, attempting auto-install...")
print(subprocess.check_output(f"pip install '{e.req}'", shell=True).decode()) print(subprocess.check_output(f"pip install '{e.req}'", shell=True).decode())
print(f'Please restart runtime or rerun command for update to take effect.')
def check_img_size(img_size, s=32): def check_img_size(img_size, s=32):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论