I got the same error. When running from interactive shell I can import torch but can't use Tensor or tensor. Module torch has no attribute error.