ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

1、环境
Linux下:cuda9.0,cuann7,python3.6,tensorflow1.8
在安装完tensorflow1.8之后,报错
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

image.png

2、解决方法
a 在path中加入cuda
执行:sudo vim ~/.bashrc
在末尾加入:
export PATH=/usr/local/cuda-9.0/bin{PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64{LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda-9.0
保存后生效,执行:source ~/.bashrc

检查 /usr/local/cuda-9.0/lib64 下是否有 libcublas.so.9.0
如果有,终端输入:
sudo ldconfig /usr/local/cuda-9.0/lib64

tensorflow与cuda的版本对应关系如下:


image.png

你可能感兴趣的:(ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory)