Pytorch automatically downloads cpu only version

username: siyuchen95
cooked: <p>I am running the command given on page <a href="https://pytorch.org/get-started/locally/" class="inline-onebox" rel="noopener nofollow ugc">Start Locally | PyTorch</a> 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:</p>
<p>pkgs/main::pytorch-1.3.1-cpu_py27h62f834f_0</p>
<p>and then I couldn’t use pytorch with my GPU at all. Does any one know how to solve this issue?</p>
<blockquote>
<p>The following packages will be downloaded:</p>
<pre><code>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
</code></pre>
<p>The following NEW packages will be INSTALLED:</p>
<p>_pytorch_select    pkgs/main/linux-64::_pytorch_select-0.1-cpu_0<br>
ninja              pkgs/main/linux-64::ninja-1.9.0-py27hfd86e86_0<br>
torchaudio         pytorch/linux-64::torchaudio-0.3.2-py27</p>
<p>The following packages will be UPDATED:</p>
<p>conda                                       4.7.12-py27_0 → 4.8.4-py27_0<br>
pytorch            pytorch::pytorch-0.3.0-py27_cuda8.0.6~ → pkgs/main::pytorch-1.3.1-cpu_py27h62f834f_0<br>
torchvision        pytorch/linux-64::torchvision-0.2.0-p~ → pytorch/noarch::torchvision-0.2.2-py_3</p>
</blockquote>

username: albanD
cooked: <p>Hi,</p>
<p>You got a very old version of pytorch.<br>
Can you upgrade your conda version to the latest and try again?</p>

username: siyuchen95
cooked: <p>I just tried running</p>
<blockquote>
<p>conda install pytorch torchvision torchaudio cudatoolkit=10.1 -c pytorch</p>
</blockquote>
<p>and it worked. It upgraded my cuda to 1.4,</p>
<blockquote>
<p>The following packages will be UPDATED:</p>
<p>pytorch            0.3.0-py27_cuda8.0.61_cudnn7.0.3hf383~ → 1.4.0-py2.7_cuda10.1.243_cudnn7.6.3_0</p>
<p>The following packages will be DOWNGRADED:</p>
<p>cudatoolkit                            10.2.89-hfd86e86_1 → 10.1.243-h6bb024c_0</p>
</blockquote>
<p>Do you think this is new enough?</p>
<p>(the errors I posted above came from running</p>
<blockquote>
<p>conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch</p>
</blockquote>
<p>I guess conda somehow decides that I can’t run cuda-11.1, so it gave me a cpu-only version.<br>
But I already had cuda-11.1 installed. Maybe it is because I am recently upgraded my OS to Ubuntu 20.04?)</p>

username: albanD
cooked: <p>You should be getting pytorch 1.7<br>
Can you run <code>conda update conda</code> first? Then try to install torch.</p>

username: mikey_t
cooked: <p>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<br>
<code>conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch</code><br>
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.</p>

username: BatmanofZuhandArrgh
cooked: <p>This worked for me &lt;3</p>