facebookresearch / facebookresearch/sam2
error importing sam2
- Dominant language
- Jupyter Notebook
- Stars
- 19.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
I get error with following lines:
`from sam2.build_sam import build_sam2`
`from sam2.sam2_image_predictor import SAM2ImagePredictor`
the message says:Unresolved reference 'sam2'
I have already excuted the command : `pip install -e ".[notebooks]"`
but I still can not import the package “sam2”
and another question,why is the root directory doesn't contain __init__.py,is this the reason?
could you please help?thanks
Contributor guide
Research direction
Reproduce the import issue after running `pip install -e ".[notebooks]"`, using the imports `sam2.build_sam` and `sam2.sam2_image_predictor` mentioned in the report. Inspect whether the repository layout and missing root `__init__.py` explain the unresolved reference. Done means identifying the required setup or confirming a project-side correction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100