AttributeError: module 'torch' has no attribute 'randn'

Thank you. I’m surprised I did exactly that twice as you said (bash-3.2$ pip uninstall torch), but returns the following:
Skipping torch as it is not installed.
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.

import torch doesn’t return error, but throws error when importing other packages.