Skip to content

ImportError: No module named 'sam3.sam' on fresh install #225

@jspinak

Description

@jspinak

Environment

  • OS: Windows 11
  • Python: 3.12.0
  • Installation method: pip install git+https://github.com/facebookresearch/sam3.git
  • SAM3 version: 0.1.0

Issue

Fresh installation of SAM3 fails to import due to a missing internal module reference.

Steps to reproduce

pip install git+https://github.com/facebookresearch/sam3.git
python -c "import sam3"

Error

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "...\sam3\__init__.py", line 3, in <module>
    from .model_builder import build_sam3_image_model
  File "...\sam3\model_builder.py", line 10, in <module>
    from sam3.model.decoder import (
  File "...\sam3\model\decoder.py", line 13, in <module>
    from sam3.sam.transformer import RoPEAttention
ModuleNotFoundError: No module named 'sam3.sam'

Analysis

The package references sam3.sam.transformer but no sam3/sam/ directory exists in the installed package. It appears this submodule may be missing from the repository or the import
 path is incorrect.

Expected behavior

import sam3 should work without errors after installation.

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