ImportError: No module named 'torch' [closed]
Hi,
After writing a command "python3 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!
I'm confused as to how this related to ROS.
You tagged kinetic meaning you're probably on 16.04. Is pytorch installed systemwide for python 2 or python 3? Or have you been using virtualenvs? What is the variable $PYTHONPATH set to?