[General boards] [Fall 2018 courses] [Summer 2018 courses] [Winter 2018 courses] [Older or newer terms]

[SOLVED] Failed to load the native TensorFlow runtime


#1

While running the code on a Teaching Lab machine using python3.6, I received a “Failed to load the native TensorFlow runtime” error. I have also provided a printout of the files I copied over (in case that is relevant). Any idea how to solve this?

Here is what I have in the directory from which I am running the code:

wolf:~/comp_ling/A3$ ls
corpora  initialization.py  parser.py    q2ctest.txt  word2vec.pkl.gz
data.py  model.py           q2btest.txt  utils

Here is what happens when I run model.py

wolf:~/comp_ling/A3$ python3.6 model.py
Traceback (most recent call last):
  File "/local/packages/python-3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/local/packages/python-3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/local/packages/python-3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/local/packages/python-3.6/lib/python3.6/imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "/local/packages/python-3.6/lib/python3.6/imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: libcusolver.so.8.0: 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 "model.py", line 13, in <module>
    import tensorflow as tf
  File "/local/packages/python-3.6/lib/python3.6/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "/local/packages/python-3.6/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/local/packages/python-3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/local/packages/python-3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/local/packages/python-3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/local/packages/python-3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/local/packages/python-3.6/lib/python3.6/imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "/local/packages/python-3.6/lib/python3.6/imp.py", line 342, in load_dynamic
    return _load(spec)
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.

#2

Turns out Tensorflow doesn’t work if you ssh into the Teaching lab machines. That was the issue.


#3

FYI, TF won’t work on the usual machine you ssh into (wolf), but it will work on any (teaching labs) machine with a GPU. I think there are some machines that you can ssh into that have GPUs, but I’m not sure which—you’ll need to check with the support folks to find out which (or maybe they have them listed somewhere, but I didn’t see it).