1.一口气
pip install tensorflow-gpu
结果,验证时报错了
libcublas.so.10.0: cannot open shared object file: No such file or
directory
2.卸掉,重新安装
pip install tensorflow-gpu==1.13.1
3.验证
import tensorflow as tf
hello=tf.constant('hello')
sess=tf.Session()
或
tf.compat.v1.Session()(tensorflow2.0以后)
print (sess.run(hello))
4.又报错:
ImportError: libcublas.so.10.0: cannot open shared object file: No
such file or directory
有文章说,tensorflow与 cuda版本不一致
5.查版本
cuda 版本
cat /usr/local/cuda/version.txt
cudnn 版本
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
版本对应情况:
GPU
Version Python version Compiler Build tools cuDNN CUDA
tensorflow-2.4.0 3.6-3.8 GCC 7.3.1 Ba