1

I have a conda environment with tensorflow with GPU installed and running fine using CUDA 8.0. It was installed using pip and is version tensorflow-gpu 1.1.0. This is on Ubuntu 14.04. I have been using it for awhile now with no issues. Then I did a sudo apt-get update and a sudo apt-get upgrade and now get the following error when I try to import tensorflow into pytyhon:

> > In [2]: import tensorflow as tf
> --------------------------------------------------------------------------- ImportError                               Traceback (most recent call
> last)
> /home/ai/miniconda3/envs/tflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py
> in <module>()
>      40     sys.setdlopenflags(_default_dlopen_flags | ctypes.RTLD_GLOBAL)
> ---> 41   from tensorflow.python.pywrap_tensorflow_internal import *
>      42   from tensorflow.python.pywrap_tensorflow_internal import __version__
> 
> /home/ai/miniconda3/envs/tflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py
> in <module>()
>      27             return _mod
> ---> 28     _pywrap_tensorflow_internal = swig_import_helper()
>      29     del swig_import_helper
> 
> /home/ai/miniconda3/envs/tflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py
> in swig_import_helper()
>      23             try:
> ---> 24                 _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname,
> description)
>      25             finally:
> 
> /home/ai/miniconda3/envs/tflow/lib/python3.5/imp.py in
> load_module(name, file, filename, details)
>     241         else:
> --> 242             return load_dynamic(name, filename, file)
>     243     elif type_ == PKG_DIRECTORY:
> 
> /home/ai/miniconda3/envs/tflow/lib/python3.5/imp.py in
> load_dynamic(name, path, file)
>     341             name=name, loader=loader, origin=path)
> --> 342         return _load(spec)
>     343 
> 
> ImportError: libcublas.so.8.0: cannot open shared object file: No such
> file or directory

I found the following related but no answer: libcublas.so.8.0, similarly this one with an upvoted answer that does not make sense to me: other libcublas. I am wondering how to fix this hopefully without going through a reinstall of all CUDA, CudNN, etc. Something in the update/upgrade broke this and evidently removed this file?

update: I made a clone of the conda environment and installed latest tensorflow 1.2.1 with GPU. Now I get the same error but different missing shared object file: libcusolver.so.8.0

talonmies
  • 70,661
  • 34
  • 192
  • 269
Zak Keirn
  • 807
  • 13
  • 22

1 Answers1

0

I was able to resolve this by only reinstalling Cuda 8.0. I did not have to reinstall CudNN or Nvidia drivers or tensorflow. Since my previous install was a deb install, I did not have to remove anything. I followed instructions at cuda install. I believe that the update/upgrade and subsequent autoremove deleted the files in /usr/local/cuda-8.0/targets/x86_64-linux/lib. During the problem, this folder only had a few files in it and now there are many including the missing ones.

Zak Keirn
  • 807
  • 13
  • 22