Installing Pytorch with Conda installs CPU only version

Hi all,

I am trying to install pytorch 1.4 with torchversion 0.5 that are compatible with CUDA. Every time I install them I get “pytorch 1.40 py3.7_cpu_0 [cpuonly] pytorch” same thing for torchvision.

I have installed cuda 10.1 and it is working with my system. I have uninstalled and install PyTorch multiple time and I only get the cpu only.

I use the following command line “conda install pytorch torchvision cudatoolkit=10.1 -c pytorch”

Please advise and thank you for the help.

1 Like

I got the answer. I initially install a CPU only version this only install cpuonly 1.0. When I uninstall pytorch to install the cuda pytorch it didn’t remove cpuonly 1.0.

to fix it:

conda uninstall pytorch
conda uninstall cpuonly

Then install pytorch again normally

conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
5 Likes

Thanks very much for your answer! conda uninstall cpuonly is the key step.

nice!!! your answer solved it very well