How to install TensorFlow-gpu with cuda8.0?
Asked Answered
R

2

22

I tried to install it according to the instructions on official website, which results in an ImportError when I import tensorflow:

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

I run the code cat /usr/local/cuda/version.txt, which shows that my cuda version is 8.0.61.

It seems that tensorflow is looking for cuda 9.0. I cannot upgrade the cuda as I am working on a shared gpu-server and I do not have the root authority.

Is there any way to make tensorflow work with cuda 8.0? Or any other way available?

Thanks!!

Rafaelarafaelia answered 2/2, 2018 at 4:52 Comment(0)
R
13

I was facing the similar issue, until I found

https://www.tensorflow.org/install/install_sources#tested_source_configurations

check your installed cuda version and cudnn version and then find out which version of tensorflow-gpu is compatible with those using link mentioned above.

I had installed cuda 8 and cudnn v5.1, hence by checking above link tensorflow-gpu 1.2.0 was compatible and after installing that using

pip install tensorflow-gpu==1.2.0

It worked for me.

Relativity answered 11/9, 2018 at 9:35 Comment(0)
H
41

You'll need to install the version 1.4.1 for CUDA-8 as

pip install tensorflow-gpu==1.4.1

The latest (version 1.5) is for CUDA-9

Hairdresser answered 2/2, 2018 at 5:15 Comment(4)
Why I install 1.4.1, it show error: ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory. Does it say it need cuda 6.5? How could I use CUDA8.0?Prandial
@Prandial That import error (ImportError: libcudnn.so.6) says you need the appropriate CuDNN library (developer.nvidia.com/cudnn). CuDNN is separate from CUDA. tensorflow-gpu==1.4.1 is for CUDA 8 as the answer suggests. Instructions to install CuDNN can be found in discussion:askubuntu.com/questions/767269/…Massive
Thank you, where did you got this information from?Samantha
github.com/tensorflow/tensorflow/releases/tag/v1.5.0 - Here in the release notes for v1.5.0, the authors mentioned that the binaries are now prebuild agains CUDA 9Hairdresser
R
13

I was facing the similar issue, until I found

https://www.tensorflow.org/install/install_sources#tested_source_configurations

check your installed cuda version and cudnn version and then find out which version of tensorflow-gpu is compatible with those using link mentioned above.

I had installed cuda 8 and cudnn v5.1, hence by checking above link tensorflow-gpu 1.2.0 was compatible and after installing that using

pip install tensorflow-gpu==1.2.0

It worked for me.

Relativity answered 11/9, 2018 at 9:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.