0

I am getting this error tried all the fixes please help

 import tensorflow as tf
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 22, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: libcudnn.so.7: 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.

did fixes as recommneded led me here updated path after installing Cuda 5.1 ImportError: libcudnn when running a TensorFlow program

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

my paths
echo $LD_LIBRARY_PATH
:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Tensorflow: ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory

did the source bash still error is there. Did all available fixes.

thanks

talonmies
  • 70,661
  • 34
  • 192
  • 269
puzzlebox
  • 1
  • 1
  • It seems that you need [`cuDNN Library for Linux`](https://developer.nvidia.com/rdp/cudnn-download) – BugKiller Aug 17 '18 at 02:37
  • I have that? Install is fine for CUDA I set path... It runs fine in CPU not in GPU... Is there a better alternative for using your GPU? – puzzlebox Sep 24 '18 at 01:06
  • `cuDNN` installed separately, `CUDA` installer dont contain `cuDNN` – BugKiller Sep 24 '18 at 02:47
  • https://www.tensorflow.org/install/gpu#software_requirements – BugKiller Sep 24 '18 at 02:51
  • Issue might be corrupted symlinks, create new one for CUDA installation. Take a look at similar issue comment https://github.com/tensorflow/tensorflow/issues/20271#issuecomment-643296453. Thanks –  Jan 21 '21 at 11:58

0 Answers0