Torch.cuda.is_available() Keeps returning false

username: GabrielBianchi
cooked: <p>I am trying to run <a href="https://github.com/NVlabs/stylegan3" rel="noopener nofollow ugc">stylegan3</a> repo, but I can´t figure out why pytorch keeps returning false when doing <code>torch.cuda.is_available()</code>. My graphics card is supported for CUDA 11.3. Also, <em>print(torch.version.cuda)</em> is returning <em>“Unable to initialize device PRN”.</em></p>
<p>I have tried many times to reinstall torch using conda, (and also tried installing it with pip, but always getting an error when doing so)</p>
<p>Here´s all I know:</p>
<p>OS: Windows 10<br>
Graphics Card: GTX 970<br>
GPU driver version: <img src="https://discuss.pytorch.org/uploads/default/original/3X/b/5/b59ec81fd87d4c6d87f5d9be3042e7459dab80e6.png" alt="image" data-base62-sha1="pUGBQzHuDJNZStMVXNPkpcZQkYu" width="510" height="227"> (496.13)<br>
Installed CUDA version: 11.3</p>
<p>running <code>nvcc --version</code> I get:</p>
<p><em>nvcc: NVIDIA (R) Cuda compiler driver</em><br>
<em>Copyright (c) 2005-2021 NVIDIA Corporation</em><br>
<em>Built on Sun_Mar_21_19:24:09_Pacific_Daylight_Time_2021</em><br>
<em>Cuda compilation tools, release 11.3, V11.3.58</em><br>
<em>Build cuda_11.3.r11.3/compiler.29745058_0</em></p>
<p>running <code>nvidia-smi</code> returns CUDA Version 11.5 (weirdly enough. I had uninstalled 11.5, and I double checked it was uninstalled, and the version I do have is 11.3):<br>
<strong>±----------------------------------------------------------------------------+</strong><br>
<strong>| NVIDIA-SMI 496.13       Driver Version: 496.13       CUDA Version: 11.5     |</strong><br>
<strong>|-------------------------------±---------------------±---------------------+</strong><br>
<strong>| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |</strong><br>
<strong>| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |</strong><br>
<strong>|                               |                      |               MIG M. |</strong><br>
<strong>|===============================+======================+======================|</strong><br>
<strong>|   0  NVIDIA GeForce … WDDM  | 00000000:01:00.0  On |                  N/A |</strong><br>
<strong>|  0%   59C    P5    19W / 200W |   1009MiB /  4096MiB |      4%      Default |</strong><br>
<strong>|                               |                      |                  N/A |</strong><br>
<strong>±------------------------------±---------------------±---------------------+</strong></p>

username: ptrblck
cooked: <p>You’ve most likely installed the CPU-only binaries, which should have been shown in during the installation. I know that the current <code>1.10</code> release has issues finding <code>torchtext+cu113</code> so you might want to install the nightlies or skip <code>torchtext</code>, if not needed.</p>

username: Ranit_Chatterjee
cooked: <p>I’ve installed GPU version. But in virtual environment I get False, but in Base environment it shows True. My python version is 3.80</p>

username: ptrblck
cooked: <p>Most likely your environments have multiple installations available, so make sure to use the desired one only. If you have trouble, create a new env and install the GPU version there.</p>