2017-07-09 5 views
2

Mögliches Duplikat von this question. Ich habe ein GPU-Konto, mit dem ich über Putty (ssh Login) verbinden. Ich habe dort ein virtualenv erstellt und ich installiere tenorflow durch pip für gpu. Alles funktioniert gut, wenn ich BefehlImportError: libcusolver.so.8.0: kann keine gemeinsame Objektdatei öffnen: Keine solche Datei oder Verzeichnis

$ pip list 

folgende Liste ausgeführt wird gezeigt werden:

backports.weakref (1.0rc1) 
bleach (1.5.0) 
funcsigs (1.0.2) 
html5lib (0.9999999) 
Markdown (2.6.8) 
mock (2.0.0) 
numpy (1.13.1) 
olefile (0.44) 
pbr (3.1.1) 
Pillow (4.2.1) 
pip (9.0.1) 
protobuf (3.3.0) 
setuptools (36.0.1) 
six (1.10.0) 
tensorflow-gpu (1.2.1) 
Werkzeug (0.12.2) 
wheel (0.29.0) 

Aber wenn ich laufen:

$ python 
>>> import tensorflow 

Es zeigt die folgende Fehlermeldung:

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/home/nauman/junaid/final/test/lib/python2.7/site- 
    packages/tensorflow/__init__.py", line 24, in <module> 
    from tensorflow.python import * 
    File "/home/nauman/junaid/final/test/lib/python2.7/site- 
    packages/tensorflow/python/__init__.py", line 49, in <module> 
    from tensorflow.python import pywrap_tensorflow 
    File "/home/nauman/junaid/final/test/lib/python2.7/site- 
    packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module> 
    raise ImportError(msg) 
    ImportError: Traceback (most recent call last): 
    File "/home/nauman/junaid/final/test/lib/python2.7/site- 
    packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module> 
    from tensorflow.python.pywrap_tensorflow_internal import * 
    File "/home/nauman/junaid/final/test/lib/python2.7/site- 
    packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in 
    <module> 
    _pywrap_tensorflow_internal = swig_import_helper() 
    File "/home/nauman/junaid/final/test/lib/python2.7/site- 
    packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in 
    swig_import_helper 
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, 
    description) 
    ImportError: libcusolver.so.8.0: cannot open shared object file: No such 
    file or directory 
    Failed to load the native TensorFlow runtime. 
    See https://www.tensorflow.org/install/install_sources#common_installation_problems 
    for some common reasons and solutions. Include the entire stack trace 
    above this error message when asking for help. 

Ich habe auch meine Umwelt eingestellt t Variablen wie folgt aus:

export CUDA_HOME=/opt/cuda 
    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64" 

Außerdem fand ich, dass libcusolver.so.8.0 nicht da ist, während libcusolver.so.7.5 gibt es in CUDA/lib64 /. Irgendwie findet Tensorflow falsche Datei oder ich weiß nichts. Jede Hilfe wäre willkommen, da ich neu in all diesen Dingen bin. Python-Version: 2.7 OS: Linux

Antwort

3

Ich löste das Problem. Eigentlich habe ich cuda 7.5 installiert und ich habe die neueste Tensorflow-Version installiert, die wahrscheinlich cuda 8.0 unterstützt. Also habe ich runtergestuft.

pip install --upgrade \ https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl 
+0

Ich habe gerade Tensorflow Version 1.2.0 anstelle von 1.3.0 installiert, um Cuda 7.5 mit 'pip install tensorflow == 1.2.0' zu verwenden. Beachten Sie, dass ich 'Tensorflow-gpu' bei 1.3.0 – shadi

+0

verlassen habe, dass^nicht funktioniert – ben26941

+0

@ ben26941 meine Vermutung ist, dass Sie cuda-9.0 verwenden. In diesem Fall versuche 'sudo apt install nvidia-cuda-dev' (wenn du eine Ubuntu-Distribution benutzt) – markroxor

4

Führen Sie einfach 'sudo ldconfig/usr/local/cuda/lib64'. Es hat für mich gelöst.

0

Wenn Sie tensorflow-gpu mit pip mit vorgefertigten .whl installiert haben, wurden die Cuda-Version behoben. Soweit ich weiß, beginnend mit 0.11.0rc1, sind alle vorgefertigten Pakete jetzt für cuda 8 gebaut. So gibt es zwei Möglichkeiten, das Problem zu lösen:

  1. installieren cuda 8 für die vorkompilierte Pakete tensorflow-gpu >= 0.11.orc1
  2. halten cuda 7.5 Aufenthalt, dann bauen tensorflow-gpu aus dem Quellcode
0

Wenn Sie CUDA-9.0 try verwenden sudo apt install nvidia-cuda-dev (wenn Sie eine Ubuntu-Distribution verwenden)

Verwandte Themen