Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'detectron2.modeling' #96

Open
p1yush99 opened this issue Jun 6, 2024 · 2 comments
Open

ModuleNotFoundError: No module named 'detectron2.modeling' #96

p1yush99 opened this issue Jun 6, 2024 · 2 comments

Comments

@p1yush99
Copy link

p1yush99 commented Jun 6, 2024

When installing libraries into colab,
!python -m pip install --quiet 'git+https://github.com/MaureenZOU/detectron2-xyz.git' not working so in installed detectron2 by the below method
!git clone https://github.com/facebookresearch/detectron2.git

Now, when importing
from semantic_sam import prepare_image, plot_multi_results, build_semantic_sam, SemanticSAMPredictor
its giving the error
"ModuleNotFoundError: No module named 'detectron2.modeling'"

@FengLi-ust
Copy link
Collaborator

Hi, why python -m pip install --quiet 'git+https://github.com/MaureenZOU/detectron2-xyz.git' not working? We modify the d2 for our model.

@Roomnum
Copy link

Roomnum commented Sep 21, 2024

Hello,I have also met the same problem about the second instruction:python -m pip install 'git+https://github.com/MaureenZOU/detectron2-xyz.git' ,and it shows:
collecting git+https://github.com/MaureenZOU/detectron2-xyz.git
Cloning https://github.com/MaureenZOU/detectron2-xyz.git to /tmp/pip-req-build-1m6rnc67
Running command git clone --filter=blob:none --quiet https://github.com/MaureenZOU/detectron2-xyz.git /tmp/pip-req-build-1m6rnc67
Resolved https://github.com/MaureenZOU/detectron2-xyz.git to commit 42121d75e10d9f858f3a91b6a39f5722c02868f0
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: -7
╰─> [0 lines of output]
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Can u solve it? thank u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants