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

5,891 views
Skip to first unread message

Hossein Hasanpour

unread,
Oct 29, 2016, 10:21:47 PM10/29/16
to Discuss
I have installed CUDA7.5 and cudnnv5  on my ubuntu 14.04.
I did
# Ubuntu/Linux 64-bit $ sudo apt-get install python-pip python-dev python-virtualenv
$ virtualenv
--system-site-packages /media/hossein/tmpstore/tensorflow_virtenv/
$ source
/media/seyyedhossein/tmpstore/tensorflow_virtenv/bin/activate
(tensorflow_virtenv)seyyedhossein@hossein:~$
# Ubuntu/Linux 64-bit, GPU enabled, Python 2.7
# Requires CUDA toolkit 7.5 and CuDNN v5. For other versions, see "Installing from sources" below.
(tensorflow_virtenv)hossein@hossein:~$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0rc1-cp27-none-linux_x86_64.whl
(tensorflow_virtenv)hossein@hossein:~$ pip install --upgrade $TF_BINARY_URL

These two lines are appended to the .bashrc :
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
export CUDA_HOME=/usr/local/cuda

the output of executing the command:
(tensorflow_virtenv)hossein@hossein:~$ pip install --upgrade $TF_BINARY_URL

is as follows:

...
 compile options
: '-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python2.7 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -c'
 x86_64
-linux-gnu-gcc: numpy/random/mtrand/distributions.c
 x86_64
-linux-gnu-gcc: numpy/random/mtrand/mtrand.c
 x86_64
-linux-gnu-gcc: numpy/random/mtrand/initarray.c
 x86_64
-linux-gnu-gcc: numpy/random/mtrand/randomkit.c
 x86_64
-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/numpy/random/mtrand/mtrand.o build/temp.linux-x86_64-2.7/numpy/random/mtrand/randomkit.o build/temp.linux-x86_64-2.7/numpy/random/mtrand/initarray.o build/temp.linux-x86_64-2.7/numpy/random/mtrand/distributions.o -Lbuild/temp.linux-x86_64-2.7 -o build/lib.linux-x86_64-2.7/numpy/random/mtrand.so
 
Creating build/scripts.linux-x86_64-2.7/f2py
 adding
'build/scripts.linux-x86_64-2.7/f2py' to scripts
 changing mode of build
/scripts.linux-x86_64-2.7/f2py from 664 to 775
 
 warning
: no previously-included files matching '*.pyo' found anywhere in distribution
 warning
: no previously-included files matching '*.pyd' found anywhere in distribution
 changing mode of
/media/seyyedhossein/tmpstore/tensorflow_virtenv/bin/f2py to 775
 
Found existing installation: six 1.5.2
 
Not uninstalling six at /usr/lib/python2.7/dist-packages, outside environment /media/seyyedhossein/tmpstore/tensorflow_virtenv
 
Found existing installation: setuptools 2.2
 
Uninstalling setuptools:
 
Successfully uninstalled setuptools
Successfully installed tensorflow protobuf wheel mock numpy six setuptools funcsigs pbr
Cleaning up...

and finally testing ...
(tensorflow_virtenv)seyyedhossein@hossein:~$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
OpenBLAS : Your OS does not support AVX instructions. OpenBLAS is using Nehalem kernels as a fallback, which may give poorer performance.
OpenBLAS : Your OS does not support AVX instructions. OpenBLAS is using Nehalem kernels as a fallback, which may give poorer performance.
Traceback (most recent call last):
 
File "<stdin>", line 1, in <module>
 
File "/media/seyyedhossein/tmpstore/tensorflow_virtenv/local/lib/python2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
 
from tensorflow.python import *
 
File "/media/seyyedhossein/tmpstore/tensorflow_virtenv/local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
 
from tensorflow.python import pywrap_tensorflow
 
File "/media/seyyedhossein/tmpstore/tensorflow_virtenv/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
 _pywrap_tensorflow
= swig_import_helper()
 
File "/media/seyyedhossein/tmpstore/tensorflow_virtenv/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
 _mod
= imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory
>>>

I dont even have cuda8! yet Im gettin this error.
What is wrong here? where did I go wrong? what wrong have i done?



Shagun Sodhani

unread,
Oct 29, 2016, 10:24:13 PM10/29/16
to Hossein Hasanpour, Discuss

It seems latest tensorflow uses libcudart.so.8.0 which is not available on your system


--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/29ca8c31-6ad1-4273-8682-35abc035288b%40tensorflow.org.

Hossein Hasanpour

unread,
Oct 29, 2016, 10:30:20 PM10/29/16
to Discuss
Thanks, but nowhere in the documentation, it is indicated that I should be using cuda 8 and not 7.5!
Does this simply mean I should install cuda 8 and everything would work?
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.

Zan Huang

unread,
Oct 29, 2016, 10:34:47 PM10/29/16
to Hossein Hasanpour, Discuss

Hello,

I have the same issue. At first the error was that the Nvidia cuda version is insufficient with the right time version. That was fixed after updating the driver, however this new issue popped up after.

Thanks for posting your issue!
I didn't know if anyone else had the same problem.


To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.

To post to this group, send email to dis...@tensorflow.org.

Douglas Eck

unread,
Oct 29, 2016, 10:35:31 PM10/29/16
to Hossein Hasanpour, Discuss
Hi Hossein,

You may be looking at the wrong version of the documentation. If you're looking at the most recent version (0.11) the instructions do suggest installing cuda 8.

To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.

To post to this group, send email to dis...@tensorflow.org.



--
Douglas Eck | Sr. Staff Research Scientist | de...@google.com | 650-336-8433

Hossein Hasanpour

unread,
Oct 29, 2016, 10:41:18 PM10/29/16
to Discuss
Thanks alot, I was using the github version : https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#common-problems
and under (Optional, Linux) Enable GPU Support it said :
If you installed the GPU version of TensorFlow, you must also install the Cuda Toolkit 7.5 and cuDNN v5. Please see Cuda installation.

So the github documentation needs to be fixed it seems.
OK I install cuda 8 and give it a try , I hope that wouid get this fixed.

@Zanhuang:
no problem man, glad it helps you as well

Thanks everyone again.

Douglas Eck

unread,
Oct 29, 2016, 10:42:35 PM10/29/16
to Hossein Hasanpour, Discuss
I *think* there is a documentation error. If you set the version to "master" at Enable GPU support (tensorflow.org) you're instructed to install 7.5.  If you set the version to r0.11 you're instructed to install 
8.0. Yet master was recently set to 0.11. 

Please (a) upgrade CUDA to 8.0 or (b) install the binary from version r0.10. 

Daniel Krotov

unread,
Oct 29, 2016, 10:43:06 PM10/29/16
to Discuss
Hey Hossein...the link below does show 8.0 is required for the specific wheel files.

https://www.tensorflow.org/versions/r0.11/get_started/os_setup.html#pip-installation

# Ubuntu/Linux 64-bit, GPU enabled, Python 2.7
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Install from sources" below.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0rc1-cp27-none-linux_x86_64.whl

Zan Huang

unread,
Oct 29, 2016, 10:49:50 PM10/29/16
to Daniel Krotov, Discuss
This is very strange. I originally installed version 8.0 and I had that error message. It only happened after upgrading to tensorflow 0.11.

                                                                                                            
         ,----,                                      ,--,                                                   
       .'   .`|                                    ,--.'|                                                   
    .'   .'   ;                                 ,--,  | :                                                   
  ,---, '    .'                ,---,         ,---.'|  : '         ,--,                    ,---,             
  |   :     ./             ,-+-. /  |        |   | : _' |       ,'_ /|                ,-+-. /  |  ,----._,. 
  ;   | .'  /  ,--.--.    ,--.'|'   |        :   : |.'  |  .--. |  | :    ,--.--.    ,--.'|'   | /   /  ' / 
  `---' /  ;  /       \  |   |  ,"' |        |   ' '  ; :,'_ /| :  . |   /       \  |   |  ,"' ||   :     | 
    /  ;  /  .--.  .-. | |   | /  | |        '   |  .'. ||  ' | |  . .  .--.  .-. | |   | /  | ||   | .\  . 
   ;  /  /--, \__\/: . . |   | |  | |        |   | :  | '|  | ' |  | |   \__\/: . . |   | |  | |.   ; ';  | 
  /  /  / .`| ," .--.; | |   | |  |/         '   : |  : ;:  | : ;  ; |   ," .--.; | |   | |  |/ '   .   . | 
./__;       :/  /  ,.  | |   | |--'          |   | '  ,/ '  :  `--'   \ /  /  ,.  | |   | |--'   `---`-'| | 
|   :     .';  :   .'   \|   |/              ;   : ;--'  :  ,      .-./;  :   .'   \|   |/       .'__/\_: | 
;   |  .'   |  ,     .-./'---'               |   ,/       `--`----'    |  ,     .-./'---'        |   :    : 
`---'        `--`---'                        '---'                      `--`---'                  \   \  /  
                                                                                                   `--`-'   

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
Message has been deleted
Message has been deleted

Sam A

unread,
Oct 31, 2016, 2:04:26 AM10/31/16
to Zan Huang, Daniel Krotov, Discuss
I believe the reason there is a difference in instructions is due to version 0.11 not being officially released yet (it is still just a release candidate). 0.11 will bump the highest supported version of CUDA to 8.0, but the r0.11 branch hasn't been merged to master yet.

saman...@gmail.com

unread,
Nov 9, 2016, 3:23:51 PM11/9/16
to Discuss

Hi Folks,

It seems the latest version only works with 8.   Is there any way to change any setup in Tensorflow to force it to use cuda 7.5?

Thanks,
S.

Martin Wicke

unread,
Nov 9, 2016, 3:31:50 PM11/9/16
to saman...@gmail.com, Discuss
You have to build a custom binary for 7.5. The latest binaries we provide are built against cuda 8. 

When you configure the build, you get to choose the cuda version to build against.

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.

Saman Sarraf

unread,
Nov 9, 2016, 4:03:06 PM11/9/16
to Martin Wicke, Discuss
Martin - Would you please refer me to the documentation of how to build a custom binary? Thanks.

Martin Wicke

unread,
Nov 9, 2016, 4:14:15 PM11/9/16
to Saman Sarraf, Discuss
Maybe I am misunderstanding what you are asking about, but it seems to me that this is covered by writing a python script and using a hashbang: https://en.wikipedia.org/wiki/Shebang_(Unix)

saurav2...@gmail.com

unread,
Jan 20, 2017, 6:41:47 AM1/20/17
to Discuss
GET CUDA8

Install CUDA8 from this link 
And , you're good to go!
Because the new TF has CUDA8 and you might have installed the GPU version

saman...@gmail.com

unread,
Apr 14, 2017, 12:56:52 PM4/14/17
to Discuss, saman...@gmail.com
Where can I get the best TF version to download for the following spec?

tensorflow ubuntu 14.04 python 2.7 cuda 7.5

Thanks
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.

To post to this group, send email to dis...@tensorflow.org.
Reply all
Reply to author
Forward
0 new messages