PyTorch CUDA error: driver version is insufficient for CUDA runtime
Cause
PyTorch was built against a newer CUDA toolkit than your installed NVIDIA driver supports. Each driver has a maximum CUDA runtime version it can run; nvidia-smi's "CUDA Version" header shows that maximum, NOT the installed toolkit version.
Common scenario: pip install torch pulled the latest cu126 wheel; your driver is 535 (max CUDA 12.2). The wheel's runtime won't talk to the older driver.
Solution
1. Read the actual driver and runtime versions:
nvidia-smi # "CUDA Version" = max runtime supported
python -c "import torch; print(torch.version.cuda)" # actual runtime PyTorch wants
2. Easier path: downgrade PyTorch to match your driver:
pip uninstall torch torchvision -y
# Driver supports up to CUDA 12.1 → install cu121 wheel
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
PyTorch publishes wheels for CUDA 11.8, 12.1, 12.4, 12.6, 12.8.
3. Harder path: update the driver. Linux:
# Ubuntu — pick latest stable
sudo apt install nvidia-driver-560
sudo reboot
Windows: download from nvidia.com/Download. WSL2 users update the Windows host driver, not anything inside WSL.
4. Confirm after the fix:
python -c "import torch; print(torch.cuda.is_available())" # True
Related errors
Did this fix it?
If your case was different, email Contact support with what you saw and we'll update the page. If it worked but took different commands on your platform, we want to know that too.