2015-11-12 113 views
6
[[email protected] ~]$ python multiply.py 
Traceback (most recent call last): 
    File "multiply.py", line 2, in <module> 
    import tensorflow as tf 
    File "/home/luohao/.usr/bin/python2.7.10/lib/python2.7/site-packages/tensorflow/__init__.py", line 4, in <module> 
    from tensorflow.python import * 
    File "/home/luohao/.usr/bin/python2.7.10/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 22, in <module> 
    from tensorflow.python.client.client_lib import * 
    File "/home/luohao/.usr/bin/python2.7.10/lib/python2.7/site-packages/tensorflow/python/client/client_lib.py", line 35, in <module> 
    from tensorflow.python.client.session import InteractiveSession 
    File "/home/luohao/.usr/bin/python2.7.10/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 11, in <module> 
    from tensorflow.python import pywrap_tensorflow as tf_session 
    File "/home/luohao/.usr/bin/python2.7.10/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module> 
    _pywrap_tensorflow = swig_import_helper() 
    File "/home/luohao/.usr/bin/python2.7.10/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.7.0: cannot open shared object file: No such file or directory 

當我執行蟒命令中,「導入錯誤」的錯誤occurs.Some加入解決了它的「出口LD_LIBRARY_PATH =的/ usr /本地/ cuda-5.5/lib:/usr/local/cuda-5.5/lib64「在/etc/profile.I嘗試,但不起作用。我在/ usr/share /下找到」libcudart.so.7.0「 man/man7/libcudart.so.7通過執行whereis命令並且不知道下一步應該怎麼做來解決它。導入錯誤:libcudart.so.7.0:無法打開共享對象文件:沒有這樣的文件或目錄

+0

您應該提供7.0 cuda安裝的路徑而不是5.5。默認是'/ usr/local/cuda-7.0/lib64'。 – havogt

+0

這是說cuda的版本不能低於7.0嗎? @havogt – luohao

+1

顯然,您的程序正在尋找cuda運行時庫7.0版。這個庫附帶cuda toolkit 7.0。 – havogt

回答

6

由於加載程序無法在您的系統上找到CUDA運行時版本7.0,因此引發了此錯誤。 TensorFlow requires CUDA 7.0.

從您的問題的路徑(/usr/local/cuda-5.5/...)看起來您已經安裝了CUDA 5.5。解決方案是將CUDA運行時升級到7.0版,該版本可從NVIDIA here獲得。

相關問題