gpt4 book ai didi

python - Tensorflow GPU安装Ubuntu 16.04错误(libcuda.so未找到)

转载 作者:太空宇宙 更新时间:2023-11-03 15:44:55 25 4
gpt4 key购买 nike

我已经安装了 GPU 版本的tensorflow,但是当我尝试导入它时,我收到以下错误消息:

I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:116] Couldn't open CUDA library libcuda.so.1. LD_LIBRARY_PATH: usr/local/cuda-8.0/lib64
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:165] hostname: sep-GS60-2QE
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] libcuda reported version is: Not found: was unable to find libcuda.so DSO loaded into this program
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:193] kernel reported version is: Permission denied: could not open driver version path for reading: /proc/driver/nvidia/version
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1066] LD_LIBRARY_PATH: usr/local/cuda-8.0/lib64
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1067] failed to find libcuda.so on this system: Failed precondition: could not dlopen DSO: libcuda.so.1; dlerror: libnvidia-fatbinaryloader.so.367.57: cannot open shared object file: No such file or directory
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so.8.0 locally

我已按照tensorflow网站的安装指南进行操作,并确保已正确安装Cuda和CudNN。

我尝试按照 nvidia 网站上其他帖子的建议,从系统中找到的 libcuda.so 到 cuda 目录创建符号链接(symbolic link),但没有帮助。

我还将 ~/.bashrc 中的参数设置为 export LD_LIBRARY_PATH="usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"export CUDA_HOME="/usr/local/cuda" 但仍然没有运气:( .

如果有人能帮助我解决这个问题,那将是非常有帮助的,因为在我的 GPU 上运行代码是我项目的关键部分。

最佳答案

您输入的LD_LIBRARY_PATH中有一个拼写错误,tensorflow读取。我看到你有 usr/local/cuda... 而不是 /usr/local/cuda (注意开头的 /路径)

通常,对我来说,使用 nvidia 的运行文件安装程序安装 cuda 后,以下 LD_LIBRARY_PATH 就足够了。导出 LD_LIBRARY_PATH=/usr/local/cuda:/usr/local/cuda/lib64:$LD_LIBRARY_PATH

关于python - Tensorflow GPU安装Ubuntu 16.04错误(libcuda.so未找到),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41839648/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com