解决 ImportError: libcublas.so.9.0: cannot open shared object file: No such file
程序员文章站
2022-07-04 20:04:30
...
本方法可以解决类似:ImportError: libcublas.so.【cuda版本】: cannot open shared object file: No such file问题
可能原因,CUDA版本不对
1、查看下版本信息
cat /usr/local/cuda/version.txt
2、根据CUDA和tensorflow版本对应的关系表,检查自己的版本是否匹配
3、如果不匹配
请安装相应的TensorFlow或者CUDA版本
安装对应版本TensorFlow的GPU版本
pip install tensorflow-gpu==版本号
安装对应版本的CUDA
参考:https://blog.csdn.net/wf19930209/article/details/81879514
4、如果匹配,仍然报错
那是因为你的cuda环境变量配置有误,请执行:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/【CUDA版本】/lib64
例如
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-9.0/lib64
参考:https://blog.csdn.net/yuejisuo1948/article/details/81043962
推荐阅读
-
解决启动MongoDB错误:error while loading shared libraries: libstdc++.so.6:cannot open shared object file:
-
linux系统安装VMware(详细解决"Cannot open /dev/vmmon: No such file or directory"问题)
-
Tensorflow:ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory
-
libiconv.so.2 cannot open shared object file: No such file or directory
-
libmatio.so.2: cannot open shared object file: No such file or directory
-
libevent-2.0.so.5: cannot open shared object file: No such file or directory
-
报错:libmysqlclient.so.18: cannot open shared object file: No such file or directory.
-
libcudart.so.9.2: cannot open shared object file: No such file or directory
-
解决error while loading shared libraries: libXXX.so.X: cannot open shared object file: No such file
-
error while loading shared libraries: xxx: cannot open shared object file: No such file or directory