I\'m having problems in importing tensorflow in python3:
>>> import tensorflow as tf
Traceback (most recent call last):
File \"/usr/local/lib/pyth
In addition to having the paths correctly set, the version of Tensorflow you have installed must be compatible with the CUDA driver version you have in your system otherwise it won't work. See the link
Found the solution:
I reinstalled nvidia-381, CUDA-8.0 (using the runfile) and cuDNN 6.0. Then I added the following in my .bashrc:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64/
No need for reinstallation. Install nvidia-cuda-dev
:
sudo apt install nvidia-cuda-dev
Install cuDNN
(which you download from https://developer.nvidia.com/cudnn), and set LD_LIBRARY_PATH
accordingly (to cuda/lib64
).
You could be having this problem if you installed the latest version of CUDA (9.0). If this is the case, you'll have the libcusolver.so.9.0 file or directory on your computer, but not 8.0, so python can't find it to import. Tensorflow doesn't yet support CUDA 9.0 (as of Oct 18th 2017).
To fix this, install CUDA 8.0, which can be found here. You can find all their legacy releases at the bottom of the main download page.
I faced this error due to incompatibility between Tensorflow version with CUDA.
I had tensorflow_gpu-1.3.0
, CUDA 9
and cuDNN 7
which are incompatible as per this https://www.tensorflow.org/install/source#tested_build_configurations
so I uninstalled tensorflow_gpu-1.3.0
and installed tensorflow_gpu-1.5.0
and it worked fine