>>> import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jake/tensorflow/lib/python3.5/site-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/home/jake/tensorflow/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 48, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/jake/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/home/jake/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
File "/home/jake/tensorflow/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/jake/tensorflow/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcudart.so.7.5: cannot open shared object file: No such file or directory
我试图在ubuntu 17上安装tensorflow。 继续收到此错误。
我还在./bashrc文件中包含导出
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64"
export CUDA_HOME=/usr/local/cuda
还有其他解决方法可以修复此错误吗?
答案 0 :(得分:0)
确保您的系统上安装了cuda 7.5
。如果你这样做,那么可能会有所帮助,
$ export PATH=/usr/local/cuda-7.5/bin:$PATH
$ export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH
如果失败,请使用
检查目录$ ls /usr/local/cuda/
查看其中的内容并相应地修改命令。