Hi there,
I'm not yet sure whether this problem I'm having is specific to TensorFlow. Any of you who are using it probably know that TensorFlow is not (and may never be?) in the Canonical repositories. You have to turn all kinds of cartwheels to get it installed.
Three months ago I did have TensorFlow with GPU capability installed on my Ubuntu 17.10 system. I use the system Python 3.6. I could write and execute programs fine. I also use an IDE called Geany. You have to tell it you want to use the Python3 interpreter, because it comes out of the box calling Py2 by default. Anyway, I know how to do that.
I had to do a full system reinstall. I can still run my TensorFlow Py3 scripts from the terminal, but no longer from the Geany IDE. This is bizarre.
Here is a very short diagnostic program:
Code:
import sys
print("\nPython version:")
print(sys.version)
import tensorflow as tf
print("\nTensorFlow version:")
print(tf.__version__)
Here is the output from a terminal session (yes, I know about the RuntimeWarning, I had the same warning when everything was working the last time):
Code:
Python version:
3.6.3 (default, Oct 3 2017, 21:45:48)
[GCC 7.2.0]
/usr/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
return f(*args, **kwds)
TensorFlow version:
1.4.0
But when I click the Execute button from Geany, here is my output:
Code:
Python version:
3.6.3 (default, Oct 3 2017, 21:45:48)
[GCC 7.2.0]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/usr/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tensorflow geany test.py", line 7, in <module>
import tensorflow as tf
File "/usr/local/lib/python3.6/dist-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/usr/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
The libcudnn.so.6 program is found when I execute from the terminal, but not from the Geany IDE. It would appear that (as I intended) I am using the Ubuntu 17.10 system Python version 3.6.3 in both cases. How is it possible for my program to behave differently?
I will also be asking questions of the TensorFlow folks... thanks for your insight!
Bookmarks