I was working with jupyter notebook, using !pip list
I'm sure I have selected the correct environment, yet jupyter notebook still reports No module named 'torch'
.
I have also tried import torch
in command line and it worked well. How to fix this problem?
Solved!
pip install jupyter
in terminal and restart jupyter notebook will fix this problem.