Skip to content

Commit

Permalink
Update general.py (fix module not found error) (#246)
Browse files Browse the repository at this point in the history
see this post here: https://stackoverflow.com/questions/77232721/python-module-not-found-error-when-importing-package

utils is in folder ultralytics not ultralytics.yolo!
  • Loading branch information
Petros626 authored Oct 13, 2023
1 parent ad9052a commit 39e491b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions yolov5/utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
import torch
import torchvision
import yaml
# this leads to module not found error
from ultralytics.yolo.utils.checks import check_requirements
# correct import
from ultralytics.utils.checks import check_requirements

from yolov5.utils import TryExcept, emojis
from yolov5.utils.downloads import curl_download, gsutil_getsize
Expand Down

0 comments on commit 39e491b

Please sign in to comment.