Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ImportError: No module named 'torch'

Hi,

After writing a command "python3 xyz_name.py" to run a script, I have an error:

Traceback (most recent call last): File "predict_img.py", line 1, in <module> import torch ImportError: No module named 'torch'

I have installed PyTorch. What can be the reason for this problem?

Thanks a lot!

ImportError: No module named 'torch'

Hi,

After writing a command "python3 xyz_name.py" to run a script, I have an error:

Traceback (most recent call last):
  File "predict_img.py", line 1, in <module>
    import torch
ImportError: No module named 'torch'

'torch'

I have installed PyTorch. What can be the reason for this problem?

Thanks a lot!

ImportError: No module named 'torch'

Hi,

After writing a command "python3 xyz_name.py" predict_img.py" to run a script, I have an error:

Traceback (most recent call last):
  File "predict_img.py", line 1, in <module>
    import torch
ImportError: No module named 'torch'

I have installed PyTorch. What can be the reason for this problem?

Thanks a lot!