I did install pytorch
on my M1 MacBook. But if I try to import it, I keep getting an error saying No module named 'torch'
Here's several ways I tried: (method #1 and #2 are from Pytorch official website)
#1
conda install pytorch torchvision torchaudio -c pytorch
#2
conda install pytorch torchvision torchaudio -c pytorch-nightly
#3
And If I try to run those command again, it say it's already installed, but if i run import torch
, it say No module named 'torch'
in Jupyter noteboook.
And in terminal if I type python then import torch works but if if type python3 then import torch does not work.
Why I'm getting this error, and how can fix this issue?