这是因为这种安装方式默认安装都是TensorFlow最新版本,即安装的是TensorFlow1.13,这个版本是无法和cuda9.0兼容的,然后我在国外一网站看到如下解释:
地址:https://github.com/tensorflow/tensorflow/issues/26182
Latest TensorFlow supports cuda 8-10. cudnn 6-7.
Each TensorFlow binary has to work with the version of cuda and cudnn it was built with. If they don't match, you have to change either the TensorFlow binary or the Nvidia softwares.