I have been trying to run YOLOv5 (https://github.com/ultralytics/yolov5) in Github codespaces. All the packages in the requirements.txt have been installed. I attached to real.pt
model (https://github.com/Team4169/objectdetection/blob/main/yolov5/real.pt) I am using. It detects cones and cubes for FRC. It works on windows and linux (raspberry pi os w/ ui) but doesn't work on linux (codespace and raspberry pi os w/o ui). When I try to run the python detect.py --weights real.pt --source 0
command the following error occurs:
Traceback (most recent call last):
File "/workspaces/objectdetection/yolov5/detect.py", line 45, in <module>
from models.common import DetectMultiBackend
File "/workspaces/objectdetection/yolov5/models/common.py", line 18, in <module>
import cv2
File "/usr/local/python/3.10.4/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/usr/local/python/3.10.4/lib/python3.10/site-packages/cv2/__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/usr/local/python/3.10.4/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Note running sudo doesn't fix this.