Pytorch automatically downloads cpu only version

I am running the command given on page Start Locally | PyTorch to install pytorch locally. I have a GPU (GeForce GTX 1070), the latest version of NVIDIA driver (455.32.00) and have previously installed CUDA (11.1). However, conda automatically fetches a cpu-only pytorch package to install:

pkgs/main::pytorch-1.3.1-cpu_py27h62f834f_0

and then I couldn’t use pytorch with my GPU at all. Does any one know how to solve this issue?

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
_pytorch_select-0.1        |            cpu_0           3 KB
conda-4.8.4                |           py27_0         2.8 MB
ninja-1.9.0                |   py27hfd86e86_0         1.2 MB
pytorch-1.3.1              |cpu_py27h62f834f_0        24.9 MB
torchaudio-0.3.2           |             py27         3.7 MB  pytorch
torchvision-0.2.2          |             py_3          44 KB  pytorch
------------------------------------------------------------
                                       Total:        32.8 MB

The following NEW packages will be INSTALLED:

_pytorch_select pkgs/main/linux-64::_pytorch_select-0.1-cpu_0
ninja pkgs/main/linux-64::ninja-1.9.0-py27hfd86e86_0
torchaudio pytorch/linux-64::torchaudio-0.3.2-py27

The following packages will be UPDATED:

conda 4.7.12-py27_0 → 4.8.4-py27_0
pytorch pytorch::pytorch-0.3.0-py27_cuda8.0.6~ → pkgs/main::pytorch-1.3.1-cpu_py27h62f834f_0
torchvision pytorch/linux-64::torchvision-0.2.0-p~ → pytorch/noarch::torchvision-0.2.2-py_3

Hi,

You got a very old version of pytorch.
Can you upgrade your conda version to the latest and try again?

I just tried running

conda install pytorch torchvision torchaudio cudatoolkit=10.1 -c pytorch

and it worked. It upgraded my cuda to 1.4,

The following packages will be UPDATED:

pytorch 0.3.0-py27_cuda8.0.61_cudnn7.0.3hf383~ → 1.4.0-py2.7_cuda10.1.243_cudnn7.6.3_0

The following packages will be DOWNGRADED:

cudatoolkit 10.2.89-hfd86e86_1 → 10.1.243-h6bb024c_0

Do you think this is new enough?

(the errors I posted above came from running

conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch

I guess conda somehow decides that I can’t run cuda-11.1, so it gave me a cpu-only version.
But I already had cuda-11.1 installed. Maybe it is because I am recently upgraded my OS to Ubuntu 20.04?)

You should be getting pytorch 1.7
Can you run conda update conda first? Then try to install torch.

1 Like

I’m having a similar problem where I can only install the cpu version of pytorch and I’m trying to install the newest (1.7.1) pytorch. I’m running
conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch
And it will only install the cpu version. I’ve updated conda and I’ve deleted previous versions of all of these packages. I’m using a Windows computer.

This worked for me <3