ibaiGorordo / ONNX-YOLOv8-Object-Detection

Python scripts performing object detection using the YOLOv8 model in ONNX.
MIT License
369 stars 93 forks source link

ModuleNotFoundError: No module named 'cv2' #10

Closed jameswan closed 1 year ago

jameswan commented 1 year ago

image_object_detection.py

Traceback (most recent call last): File "C:\Users\James\Desktop\articles\ONNX-YOLOv8-Object-Detection\image_object_detection.py", line 1, in from yolov8 import YOLOv8 File "C:\Users\James\Desktop\articles\ONNX-YOLOv8-Object-Detection\yolov8__init__.py", line 1, in from .YOLOv8 import YOLOv8 File "C:\Users\James\Desktop\articles\ONNX-YOLOv8-Object-Detection\yolov8\YOLOv8.py", line 2, in import cv2 ModuleNotFoundError: No module named 'cv2'

conda run --name yolo_classify python -c "import sys; print(sys.version); import cv2; print(cv2.version)" 3.9.16 | packaged by conda-forge | (main, Feb 1 2023, 21:28:38) [MSC v.1929 64 bit (AMD64)] 4.7.0

ibaiGorordo commented 1 year ago

That is probably an issue with your Conda environment or how you run the program