Skip to content

Commit

Permalink
YOLOv5 PyTorch Hub models >> check_requirements() (#2591)
Browse files Browse the repository at this point in the history
Prints 'Please restart runtime or rerun command for update to take effect.' following package auto-install to inform users to restart/rerun.
  • Loading branch information
glenn-jocher authored Mar 24, 2021
1 parent 8ace1b1 commit 75feeb7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def check_requirements(file='requirements.txt', exclude=()):
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(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):
Expand Down

0 comments on commit 75feeb7

Please sign in to comment.