Reputation: 81
I've just installed
Ubuntu 18.04
NVIDIA GPU driver 390
CUDA Toolkit version 9.0 (with all the patches)
CUDNN 7.0.5
followed this link https://github.com/markjay4k/Install-Tensorflow-on-Ubuntu-17.10-/blob/master/Tensorflow%20Install%20instructions.ipynb
and instead of conda for tensorflow installation I've used Virtualenv
and after installation, I couldn't import tensorflow module in python due to this error
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/kai/tensorflow/local/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/home/kai/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/kai/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/kai/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/kai/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/kai/tensorflow/local/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: libcudnn.so.7: cannot open shared object file: No such file or directory
but I think I correctly put those at the right place like below show
$ cd /usr/local/cuda/lib64
:/usr/local/cuda/lib64$ ls -l libcudnn*
-rwxr-xr-x 1 root root 287624224 May 15 19:01 libcudnn.so
-rwxr-xr-x 1 root root 287624224 May 15 19:01 libcudnn.so.7
-rwxr-xr-x 1 root root 287624224 May 15 19:01 libcudnn.so.7.0.5
-rw-r--r-- 1 root root 280805558 May 15 19:02 libcudnn_static.a
so now I wonder why this happen
thanks to read this
Upvotes: 3
Views: 2601
Reputation: 81
solved by
sudo apt install nvidia-cuda-toolkit
don't know why there isn't the tip for this at official site
Upvotes: 5