How can I install chainer-cuda-deps?
I am attempting to install chainer-cude-deps. When I try to install (sudo pip install chainer-cuda-deps), I get the following error:
In file included from src/cpp/cuda.cpp:1:0: src/cpp/cuda.hpp:14:18: fatal error: cuda.h: No such file or directory #include <cuda.h> ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-sLLkNT/pycuda/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-OAHHif-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-sLLkNT/pycudaThis is following the following previous steps:
sudo pip install chainer
sudo dpkg -i cuda-repo-ubuntu1410-7-0-local_7.0-28_amd64.debWhat should I do to try to install chainer-cuda-deps?
3 Answers
It is a problem of pycuda.setup.py of pycuda checks nvcc command and guesses a root directory of CUDA.
..., and then it sets include directory of CUDA.
All you need is set path correctly before pip.
PATH=/usr/local/cuda-7.0/bin:$PATH
pip install chainer-cuda-depsPlease try it!
I was also plagued by the same error. Perhaps you also pycuda is not installed properly. instead pip, please try to install the pycuda from the source.
If pycuda can not be installed from the source, there is a risk such as the path of CUDA itself is funny.
Eventually Ubuntu14.04, we have been successful in the construction of pycuda and chainer environment on the configuration CUDA7.0.
Put incidentally to write my environment
On the assumption #CUDA is that it is installed properly
#CUDA Relationship of PATH (by rewriting your environment)
CUDA_ROOT=/usr/local/cuda-7.0
PATH=$PATH:/usr/local/cuda-7.0/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-7.0/lib64:/usr/local/cuda-7.0/lib
CPATH=$CPATH:/usr/local/cuda-7.0/include
CUDA_INC_DIR=/usr/local/cuda-7.0/bin:$CUDA_INC_DIR
#Installing from source of #pycuda
git clone --recursive
cd pycuda
python configure.py
sudo python setup.py install
sudo make installGood luck.
0Put incidentally to write my environment
On the assumption #CUDA is that it is installed properly
CUDA Relationship of PATH (by rewriting your environment)
CUDA_ROOT=/usr/local/cuda-7.0
PATH=$PATH:/usr/local/cuda-7.0/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-7.0/lib64:/usr/local/cuda-7.0/lib
CPATH=$CPATH:/usr/local/cuda-7.0/include
CUDA_INC_DIR=/usr/local/cuda-7.0/bin:$CUDA_INC_DIR
Installing from source of #pycuda
git clone --recursive cd pycuda python configure.py sudo python setup.py install sudo make install
1