1

I install theano on ubuntu 14.04 using below commands :

sudo apt-get install python3-numpy python3-scipy python3-dev python3-pip python3-nose g++ libopenblas-dev git

sudo pip install Theano

I have installed cuda7.5. If I run ncvv --version, I get below message :

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17

I cannot use theano gpu version. My command and error message is here :

$sudo THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python test1.py

ERROR (theano.sandbox.cuda): nvcc compiler not found on $PATH. Check your nvcc installation and try again.

[Elemwise{exp,no_inplace}(<TensorType(float32, vector)>)]
Looping 1000 times took 2.507168 seconds
Result is [ 1.23178029  1.61879337  1.52278066 ...,  2.20771813  2.29967761
  1.62323284]
Used the cpu
zakjma
  • 2,030
  • 12
  • 40
  • 81

2 Answers2

1

First, check and see whether there is a file named NVCC at '/usr/local/cuda/bin/'. If there is go on with the following commands and if not, I suppose you have to install CUDA toolkit, etc.

Only run the following commands:

$ export PATH="/usr/local/cuda/bin/:$PATH"
$ source .bashrc

You might have to restart too but it should work even if you do not restart.

Pang
  • 9,564
  • 146
  • 81
  • 122
-1

You need to add the folder of the cuda compiler to the PATH variable:

export PATH=/usr/local/cuda-7.5/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH

then run ldconfig

Tshilidzi Mudau
  • 7,373
  • 6
  • 36
  • 49
Godfather
  • 314
  • 2
  • 7