C:\WINDOWS\system32>nvidia-smi NVIDIA-SMI has failed because it
couldn’t communicate with the NVIDIA driver. Make sure that the latest
NVIDIA driver is installed and running. This can also be happening if
non-NVIDIA GPU is running as primary display, and NVIDIA GPU is in
WDDM mode.
网上大多数办法是ubantu或linux的,这里记录windows
出现这个的原因是显卡出现了感叹号,我这里是已经解决后的样子,所以没有了感叹号
解决办法,搜索https://www.nvidia.cn/官网,点击右上角驱动程序
根据自己的显卡系列,填写,点击搜索,下载,下载后,双击自动安装,选择精简,安装完毕,感叹号没有了,且命令行输入NVIDIA-SMI
正常输出