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 'torch._prims_common' #246

Closed
yinxiaomao opened this issue Feb 8, 2025 · 1 comment
Closed

Comments

@yinxiaomao
Copy link

根据手册进行了环境配置,在运行过程中报错:
Traceback (most recent call last):
File "main.py", line 4, in
from ISAT.main import main
File "/home/yxs/DL/dl/SAM/ISAT_with_segment_anything-master/ISAT/main.py", line 6, in
from ISAT.widgets.mainwindow import MainWindow
File "/home/yxs/DL/dl/SAM/ISAT_with_segment_anything-master/ISAT/widgets/mainwindow.py", line 30, in
from ISAT.segment_any.segment_any import SegAny, SegAnyVideo
File "/home/yxs/DL/dl/SAM/ISAT_with_segment_anything-master/ISAT/segment_any/segment_any.py", line 7, in
import timm
File "/home/yxs/.conda/envs/isat_env/lib/python3.8/site-packages/timm/init.py", line 2, in
from .layers import is_scriptable, is_exportable, set_scriptable, set_exportable
File "/home/yxs/.conda/envs/isat_env/lib/python3.8/site-packages/timm/layers/init.py", line 1, in
from .activations import *
File "/home/yxs/.conda/envs/isat_env/lib/python3.8/site-packages/timm/layers/activations.py", line 10, in
from torch import nn as nn
File "/home/yxs/.conda/envs/isat_env/lib/python3.8/site-packages/torch/nn/init.py", line 2, in
from .modules import * # noqa: F403
File "/home/yxs/.conda/envs/isat_env/lib/python3.8/site-packages/torch/nn/modules/init.py", line 1, in
from .module import Module
File "/home/yxs/.conda/envs/isat_env/lib/python3.8/site-packages/torch/nn/modules/module.py", line 9, in
from torch._prims_common import DeviceLikeType
ModuleNotFoundError: No module named 'torch._prims_common'
请问如何解决?

@yatengLG
Copy link
Owner

yatengLG commented Feb 8, 2025

检查下torch版本 或者 使用pip 安装吧。

pip install isat-sam安装
isat-sam运行 试一试

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

2 participants