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.fx' #4

Open
shmorish opened this issue Nov 10, 2022 · 0 comments
Open

ModuleNotFoundError: No module named 'torch.fx' #4

shmorish opened this issue Nov 10, 2022 · 0 comments

Comments

@shmorish
Copy link

shmorish commented Nov 10, 2022

hi

I ran the code "train.py" on my server and got this error.
I searched and found that it was added in PyTorch 1.8.0, so I upgraded PyTorch.
However, I got another error that 「ModuleNotFoundError: No module named 'torch.ao'」

Would you please tell me how to fix the problem?


(DRNet2) shoto@istlab-System-Product-Name:~/DRNet$ sudo python train.py
['/mnt/shoto/DRNet', '/mnt/shoto/anaconda3/envs/DRNet2/lib/python37.zip', '/mnt/shoto/anaconda3/envs/DRNet2/lib/python3.7', '/mnt/shoto/anaconda3/envs/DRNet2/lib/python3.7/lib-dynload', '/mnt/shoto/.local/lib/python3.7/site-packages', '/mnt/shoto/anaconda3/envs/DRNet2/lib/python3.7/site-packages']
/mnt/shoto/.local/lib/python3.7/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory
  warn(f"Failed to load image Python extension: {e}")
Traceback (most recent call last):
  File "train.py", line 6, in <module>
    import datasets
  File "/mnt/shoto/DRNet/datasets/__init__.py", line 7, in <module>
    import misc.transforms as own_transforms
  File "/mnt/shoto/DRNet/misc/transforms.py", line 10, in <module>
    from torchvision.transforms import functional as TrF
  File "/mnt/shoto/.local/lib/python3.7/site-packages/torchvision/__init__.py", line 7, in <module>
    from torchvision import models
  File "/mnt/shoto/.local/lib/python3.7/site-packages/torchvision/models/__init__.py", line 2, in <module>
    from .convnext import *
  File "/mnt/shoto/.local/lib/python3.7/site-packages/torchvision/models/convnext.py", line 9, in <module>
    from ..ops.misc import ConvNormActivation
  File "/mnt/shoto/.local/lib/python3.7/site-packages/torchvision/ops/__init__.py", line 18, in <module>
    from .poolers import MultiScaleRoIAlign
  File "/mnt/shoto/.local/lib/python3.7/site-packages/torchvision/ops/poolers.py", line 7, in <module>
    import torch.fx
ModuleNotFoundError: No module named 'torch.fx'
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

1 participant