Nvidia-smi is working but torch.cuda.is_available() returns False

I am using a Windows 10 setup in my college lab

nvidia-smi returns

±----------------------------------------------------------------------------+
| NVIDIA-SMI 436.15 Driver Version: 436.15 CUDA Version: 10.1 |
|-------------------------------±---------------------±---------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 208… WDDM | 00000000:B3:00.0 On | N/A |
| 30% 36C P8 15W / 250W | 534MiB / 11264MiB | 1% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 596 C+G Insufficient Permissions N/A |
| 0 4588 C+G …dows.Cortana_cw5n1h2txyewy\SearchUI.exe N/A |
| 0 6484 C+G Insufficient Permissions N/A |
| 0 7108 C+G Insufficient Permissions N/A |
| 0 7288 C+G Insufficient Permissions N/A |
| 0 7328 C+G Insufficient Permissions N/A |
| 0 7816 C+G …6)\Google\Chrome\Application\chrome.exe N/A |
| 0 8116 C+G Insufficient Permissions N/A |
| 0 8540 C+G …1.85.0_x64__8wekyb3d8bbwe\YourPhone.exe N/A |
| 0 9972 C+G …t_cw5n1h2txyewy\ShellExperienceHost.exe N/A |
| 0 10444 C+G Insufficient Permissions N/A |
| 0 10908 C+G Insufficient Permissions N/A |
| 0 10996 C+G C:\Windows\explorer.exe N/A |
| 0 11524 C+G …5n1h2txyewy\StartMenuExperienceHost.exe N/A |
| 0 12920 C+G Insufficient Permissions N/A |
| 0 13372 C+G Insufficient Permissions N/A |
| 0 14780 C+G Insufficient Permissions N/A |
| 0 14892 C+G …hell.Experiences.TextInput.InputApp.exe N/A |
| 0 14944 C+G …oftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe N/A |
±----------------------------------------------------------------------------+

But when i type

torch.cuda.is_available() it returns False

Do you have the good GPU driver version installed on your machine ?

How did you install PyTorch?
If you’ve installed the binaries, could you check the log showing which CUDA version will be used?