Pytorch with correct CUDA

I am fairly new to CUDA, and I have been trying to get pytorch to work. So far all my attempts have resulted with torch.cuda.is_available() and torch.version.cuda outputting False and None, respectively.

nvcc --version outputs

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:04_Central_Daylight_Time_2018
Cuda compilation tools, release 10.0, V10.0.130

nvidia-smi outputs

Fri Sep 13 15:35:32 2024
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 441.20       Driver Version: 441.20       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| 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 207... WDDM  | 00000000:01:00.0  On |                  N/A |
| N/A   52C    P8     8W /  N/A |   1393MiB /  8192MiB |      5%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1876    C+G   Insufficient Permissions                   N/A      |
|    0      2128    C+G   ...cation\128.0.2739.67\msedgewebview2.exe N/A      |
|    0      3700    C+G   ...5n1h2txyewy\StartMenuExperienceHost.exe N/A      |
|    0      4756    C+G   C:\Windows\explorer.exe                    N/A      |
|    0      5524    C+G   Insufficient Permissions                   N/A      |
|    0      6108    C+G   ...cal\Programs\Microsoft VS Code\Code.exe N/A      |
|    0      7520    C+G   ...t_cw5n1h2txyewy\ShellExperienceHost.exe N/A      |
|    0     13424    C+G   ...434.5.0_x64__cv1g1gvanyjgm\WhatsApp.exe N/A      |
|    0     14816    C+G   ...Client.CBS_cw5n1h2txyewy\SearchHost.exe N/A      |
|    0     16348    C+G   ...mmersiveControlPanel\SystemSettings.exe N/A      |
|    0     18900    C+G   ...4.5142.0_x64__8wekyb3d8bbwe\GameBar.exe N/A      |
|    0     19876    C+G   ...ent.CBS_cw5n1h2txyewy\TextInputHost.exe N/A      |
|    0     20356    C+G   ...)\Microsoft\Edge\Application\msedge.exe N/A      |
|    0     21172    C+G   ...__8wekyb3d8bbwe\PhoneExperienceHost.exe N/A      |
|    0     21520    C+G   ..._x64__8wekyb3d8bbwe\WindowsTerminal.exe N/A      |
+-----------------------------------------------------------------------------+

I have tried installing pytorch for CUDA 10.0 and 10.2 from Previous PyTorch Versions | PyTorch, using both conda and pip. None of them worked.

I’m in a conda environment but I’m also not entirely sure which version of python would be compatible with the pytorch I need for the CUDA versions I have.

I’m pretty sure I’m making a novice mistake, but I’d appreciate all the help, thank you.

Your locally installed CUDA toolkit won’t be used unless you build PyTorch from source or a custom CUDA extension. Install a recent NVIDIA driver and the PyTorch binaries afterwards and it should work.