CUDA driver version is insufficient for CUDA runtime version
Cause
Your installed PyTorch (or other CUDA-using library) was compiled against a newer CUDA toolkit than your NVIDIA driver supports. Each driver version has a maximum CUDA runtime it can use.
Solution
Check your current driver and the maximum CUDA it supports:
nvidia-smi
The "CUDA Version" shown is the maximum your driver supports, NOT the version installed.
Two paths:
1. Update the NVIDIA driver (preferred). Get the latest from nvidia.com/Download or use your distro's package manager. After install, reboot. nvidia-smi should show a higher CUDA version.
2. Downgrade your library to match your driver. For PyTorch:
# Driver supports CUDA 11.8, install matching PyTorch
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118
On Windows with WSL2: Update your Windows NVIDIA driver, NOT the Linux one. WSL2 inherits the host's driver.
Related errors
Did this fix it?
If your case was different, email hello@runlocalai.co 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.