Kaustubh Mundra
Kaustubh Mundra

Reputation: 51

Import error while doing import tensorflow as tf

I have installed tensorflow for GPU using native pip using native pip to install tensorflow

While I use import tensorflow as tf with python3,

ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory

I don't know how to solve this. Please help. I have crawling through google and stack overflow! I am using ubuntu17.04!

Upvotes: 1

Views: 369

Answers (1)

maxbit89
maxbit89

Reputation: 770

You are missing nvidia cuda or some parts of it. This error says that it can't find a lib called libcublas.so.8.0 wich is part of nvidias cuda. I don't know which Linux you have but if it is debian/ubuntu related you can try to install cuda like this:

sudo apt-get install nvidia-cuda-dev nvidia-cuda-toolkit

You also probably need this:

sudo apt-get install libcupti-dev 

Note that you can also build tensorflow without GPU support see: https://www.tensorflow.org/install/install_sources

Upvotes: 1

Related Questions