No module named “Torch”

前端 未结 13 993
慢半拍i
慢半拍i 2021-01-04 01:41

I installed pytorch via

conda install pytorch-cpu torchvision-cpu -c pytorch

And I also tried

pip3 install https://download.pytorch         


        
13条回答
  •  天命终不由人
    2021-01-04 02:18

    If you are using windows and you have no CUDA, then go with the following command.

    pip install torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
    

    You can visit its official site for more explanation. Pytorch Official site

提交回复
热议问题