cannot be found when importing tensorflow

I am installing cuda 9.0 and the latest Tensorflow 1.8. The error message goes:

ImportError: cannot open shared object file: No such file or directory

Besides, I cannt search under /usr/local directory. I am not sure whether cuda9.0 is properly installed. The nvcc --version yields the cuda version to be 9.0.

Any solutions?

You might want to make sure that the LD_LIBRARY_PATH environment variable is properly set:

Yes, I can be sure. The point is, there is no such file “” in lib or lib64 (but only

It may be a broken install then.

Usually there is a file like:


Yes, it should be the problem. What is your suggestion for this problem? I followed exactly step-by-step tutorial in Nvidia website. BTW, I am using centOS 7 system.

The problem has been solved. Here is my solution:

  1. In order to upgrade to cuda-9.0, a compatible nvidia driver ( is required. Check here
  2. To install cuda9.0 toolkit in CentOS system, it would be better to use runfile (local) than rpm.