Skip to content Skip to sidebar Skip to footer

Import Error When Trying To Import Tensorflow With Gpu

ImportError: libcuda.so.1: cannot open shared object file: No such file or directory Failed to load the native TensorFlow runtime. This error is appeared when import tensorflow. I

Solution 1:

If you are using TensorFlow with GPU, you need to install CUDA and cuDNN. Please follow instructions on https://www.tensorflow.org/install/

If you have already install CUDA and cuDNN, but still get this error, then you probably forgot to export your libraries: for Linux, you may need to set LD_LIBRARY_PATH to include CUDA libraries.

Solution 2:

After installing TensorFlow 1.11 GPU via Anaconda "conda install tensorflow-gpu" I also experienced the same problem. Before TF 1.11 I used TF 1.04. Just before the TF update I updated Nvidia Driver to the version 396 through ppa.

There was no trace of libcuda.so.1 in my entire linux.

After many trials, the problem was solved when I changed the nvidia driver to 390. The 390 version inserted libcuda.so.1 to /usr/lib/i386-linux-gnu directory, which evidently solved the problem.

Post a Comment for "Import Error When Trying To Import Tensorflow With Gpu"