Skip to content

No module named 'ultralytics.yolo' #256

Open
@bminevich

Description

@bminevich

I followed the steps listed. I saved the repository locally, made a new python environment locally (3.9), then I ran the requirements.txt file, uninstalled torch and torchvision and installed the cuda versions, and then I ran the setup.py file.

But I am getting this error:

ModuleNotFoundError Traceback (most recent call last)
Cell In[1], line 8
5 import cv2
6 import tifffile as tf
----> 8 from fastsam import FastSAM, FastSAMPrompt
9 import torch
10 import glob

File ~/.conda/envs/image_analysis/lib/python3.9/site-packages/fastsam/init.py:3
1 # Ultralytics YOLO 🚀, AGPL-3.0 license
----> 3 from .model import FastSAM
4 from .predict import FastSAMPredictor
5 from .prompt import FastSAMPrompt

File ~/.conda/envs/image_analysis/lib/python3.9/site-packages/fastsam/model.py:12
1 # Ultralytics YOLO 🚀, AGPL-3.0 license
2 """
3 FastSAM model interface.
4
(...)
9 results = model.predict('ultralytics/assets/bus.jpg')
10 """
---> 12 from ultralytics.yolo.cfg import get_cfg
13 from ultralytics.yolo.engine.exporter import Exporter
14 from ultralytics.yolo.engine.model import YOLO

ModuleNotFoundError: No module named 'ultralytics.yolo'

How do I resolve this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions