I installed torch after creating the anaconda virtual environment using the following commands:
pip3 install torch torchvision torchaudio
Then I run the following commands in VSCode successfully:
import torch
print(torch.__version__)
However, the above commands in the Jupyter notebook return the following error:
ModuleNotFoundError: No module named 'torch'
I used the same Anaconda virtual environment for both. I have windows 10 OS.
Can anyone tell me why should there be an error in the Jupyter notebook? and how to fix this error? Should I install the torch using conda but then should I remove the pip installation?