錯誤1:ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory
一般這種問題是版本不相容
我的情況是:tensorflow-gpu 1.13.1與cuda10.1不相容,需要使用cuda10.0才可以
好在cuda10.1和cuda10.0對應的都是cudnn7.5.0
cudnn與cuda版本對應:https://developer.nvidia.com/rdp/cudnn-download
解除安裝cuda10.1:
1. 進入:cd /usr/local/cuda-10.1/bin
2. 執行:cuda-uninstaller,全選然後done
3. 将相應的檔案夾rm -rf掉
4. PATH路徑可以安裝完新cuda後更改
cuda10.0安裝位址:https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=runfilelocal
下載下傳完使用Xftp上傳到遠端伺服器
cuda安裝攻略:https://blog.csdn.net/wf19930209/article/details/81879514
環境變量更改:http://www.runoob.com/linux/linux-comm-export.html
1.先export -p 檢視環境變量
2.再export -n **** 删除不要的環境變量(注意這裡是删除整個環境變量)
3.再export **** 添加所要的環境變量
再報錯(錯誤2):ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory
原來是安裝好的cudnn沒有配置
cudnn配置:https://www.cnblogs.com/go-better/p/7625541.html
解決此問題的參考連結:
https://blog.csdn.net/qq_29921623/article/details/78110853 (中文-對應錯誤2)
https://devtalk.nvidia.com/default/topic/1047898/cuda-10-1-tensorflow-1-13/ (英文-對應錯誤1)