1

I installed cuda-repo-ubuntu1604-8-0-local on Ubuntu 16.10. When I import tensorflow in python, everything seems fine:

Python 2.7.12+ (default, Sep 17 2016, 12:08:02) 
[GCC 6.2.0 20160914] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally

but I get the following when I try nvcc -v. Also I tried installing the Chainer framework and it says it can't find nvcc.

nvcc -v
/usr/bin/nvcc: line 1: /bin: Is a directory
/usr/bin/nvcc: line 2: cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64.deb: command not found
/usr/bin/nvcc: line 3: cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64.deb: command not found
/usr/bin/nvcc: line 4: cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64.deb: command not found
/usr/bin/nvcc: line 5: cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64.deb: command not found
/usr/bin/nvcc: line 6: syntax error near unexpected token `('
/usr/bin/nvcc: line 6: ` * This source code and/or documentation ("Licensed Deliverables") are'

Is the output from nvcc -v ok? I'm guessing it's not. How do I properly install nvcc?

  • Your posted error mesage doesn't seem to be complete. – George Udosen Jan 4 '17 at 2:53
  • DId you add it to your .bashrc file ? – George Udosen Jan 4 '17 at 2:55
  • @George That's the entire error message. – Soubriquet Jan 4 '17 at 2:55
  • @George What should I add? – Soubriquet Jan 4 '17 at 2:56
  • The path to cuda. – George Udosen Jan 4 '17 at 2:57
0

You need to add cuda path to your /home/username/.bashrc file to setup the CUDA environment:

export CUDA_HOME=/usr/local/cuda-7.5 
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64 

PATH=${CUDA_HOME}/bin:${PATH} 
export PATH 

Please change the version numbers to yours and source your /home/username/.bashrc file.

source:

http://www.r-tutor.com/gpu-computing/cuda-installation/cuda7.5-ubuntu

  • Just followed those instructions you posted and got the same error. :/ – Soubriquet Jan 4 '17 at 3:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.