**在anaconda3里面验证yolov5遇见问题,
摸索好久都没有解决。
C:\ProgramData\Anaconda3\envs\yolov5_38\python.exe C:/yolov5/detect.py
detect: weights=yolov5s.pt, source=0, data=data\coco128.yaml, imgsz=[640, 640], conf_thres=0.5, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs\detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False
YOLOv5 2022-6-28 Python-3.8.13 torch-1.13.0+cpu CPU
Fusing layers...
YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients
Traceback (most recent call last):
File "C:/yolov5/detect.py", line 256, in <module>
main(opt)
File "C:/yolov5/detect.py", line 251, in main
run(**vars(opt))
File "C:\ProgramData\Anaconda3\envs\yolov5_38\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:/yolov5/detect.py", line 100, in run
dataset = LoadStreams(source, img_size=imgsz, stride=stride, auto=pt)
File "C:\yolov5\utils\dataloaders.py", line 328, in __init__
assert cap.isOpened(), f'{st}Failed to open {s}'
AssertionError: 1/1: 0... Failed to open 0
Process finished with exit code 1