Pytorch and cuda not compatible

I have got this error when I tried a code implemented in pytorch, I’m using the GPU mode in colab. What commands should I use to upgrade.
I tried this but didn’t do much:

!conda install pytorch==1.5.0 torchvision==0.6.0 cudatoolkit=10.2 -c pytorch

File "", line 210, in <module>
  File "", line 145, in train
    train_prec, train_loss = engine.train(state, e)
  File "/content/WS_DAN_PyTorch-master/utils/", line 41, in train
    target = label.cuda()
  File "/usr/local/lib/python3.6/site-packages/torch/cuda/", line 186, in _lazy_init
  File "/usr/local/lib/python3.6/site-packages/torch/cuda/", line 77, in _check_driver
    of the CUDA driver.""".format(str(torch._C._cuda_getDriverVersion())))
The NVIDIA driver on your system is too old (found version 10010).
Please update your GPU driver by downloading and installing a new
version from the URL:
Alternatively, go to: to install
a PyTorch version that has been compiled with your version
of the CUDA driver.
import torch 

Here are the version that I’m using , what should I update?

!nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

I would appreciate your help ! Thank you

Choose cudatoolkit=10.1

Also, why are you using Pytorch 1.5?

I don’t know, The github code didn’t provide any requirement , so I used pytorch 1.5. I will try 10.1.

Don’t use 1.5. Copy the command from

1 Like