gpt4 book ai didi

tensorflow - ImportError : libcudart. so.8.0:无法打开共享库文件:没有这样的文件或目录

转载 作者:行者123 更新时间:2023-12-04 01:55:44 24 4
gpt4 key购买 nike

我试图在我的系统上使用tensorflow-gpu。我已经重新安装了很多次,它给出下面的错误。但是当我使用tensorflow-cpu时,它可以正常工作。我安装了cuda 8.0工具包和cudnn 5.1。

  Traceback (most recent call last):
File "finetune.py", line 17, in <module>
import tensorflow as tf
File "/home/saurabh/code/env/local/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/saurabh/code/env/local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/saurabh/code/env/local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 61, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/saurabh/code/env/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/home/saurabh/code/env/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory


Failed to load the native TensorFlow runtime.

See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error

for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.

最佳答案

问题是您没有设置环境变量CUDA_HOME。如果您认为已安装CUDA,则需要确保上述环境变量设置为prob = perly,并且包含所有共享库所在的CUDA安装目录的地址。

export CUDA_HOME=/CUDA/installation/path
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64"

关于tensorflow - ImportError : libcudart. so.8.0:无法打开共享库文件:没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43162667/

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