在运行 nvidia-smi时出现以下错误:
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver.
解决方法:
step1: 运行 “nvcc -V”
(base) wzg@wzg:~/Desktop$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
step2: 运行“whereis nvidia”
(base) wzg@wzg:~/Desktop$ whereis nvidia
nvidia: /usr/lib/nvidia /usr/share/nvidia /usr/src/nvidia-440.33.01/nvidia
根据返回的信息,我的nvidia的版本是440.33.01
step3: 运行 “sudo apt-get install dkms”
sudo apt-get install dkms
step4: 根据step3得到的nvidia版本信息,执行以下命令
sudo dkms install -m nvidia -v 440.33.01