这个错误出现时,首先检查自己安装的tensorflow版本是否是Gpu版本的,如果是使用的Anaconda或者miniConda的话,可以使用 conda list查看安装了哪些包
conda list
image.png
找到tensorflow看看是不是后面加了个GPU