YOLOv5 PyTorch Hub models >> check_requirements() (#2591)
Browse filesPrints 'Please restart runtime or rerun command for update to take effect.' following package auto-install to inform users to restart/rerun.
- utils/general.py +1 -0
utils/general.py
CHANGED
@@ -100,6 +100,7 @@ def check_requirements(file='requirements.txt', exclude=()):
|
|
100 |
except Exception as e: # DistributionNotFound or VersionConflict if requirements not met
|
101 |
print(f"{prefix} {e.req} not found and is required by YOLOv5, attempting auto-install...")
|
102 |
print(subprocess.check_output(f"pip install '{e.req}'", shell=True).decode())
|
|
|
103 |
|
104 |
|
105 |
def check_img_size(img_size, s=32):
|
|
|
100 |
except Exception as e: # DistributionNotFound or VersionConflict if requirements not met
|
101 |
print(f"{prefix} {e.req} not found and is required by YOLOv5, attempting auto-install...")
|
102 |
print(subprocess.check_output(f"pip install '{e.req}'", shell=True).decode())
|
103 |
+
print(f'Please restart runtime or rerun command for update to take effect.')
|
104 |
|
105 |
|
106 |
def check_img_size(img_size, s=32):
|