1
votes

I tried to install PyCUDA using these instructions: http://wiki.tiker.net/PyCuda/Installation/Linux and at the point 3 I was compiling with:

su -c "make install"

have this output from console:

running install
running bdist_egg
running egg_info
writing requirements to pycuda.egg-info/requires.txt
writing pycuda.egg-info/PKG-INFO
writing top-level names to pycuda.egg-info/top_level.txt
writing dependency_links to pycuda.egg-info/dependency_links.txt
reading manifest file 'pycuda.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pycuda.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building '_driver' extension
gcc -pthread -DDYNAMIC_ANNOTATIONS_ENABLED=1 -fwrapv -Wall -g -fPIC -DPYGPU_PACKAGE=pycuda -DHAVE_CURAND=1 -DBOOST_PYTHON_SOURCE=1 -DPYGPU_PYCUDA=1 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION=1 -Dboost=pycudaboost -Isrc/cpp -Ibpl-subset/bpl_subset -I/usr/local/cuda/include -I/usr/lib/python3.2/site-packages/numpy/core/include -I/usr/lib/python3.2/site-packages/numpy/core/include -I/usr/include/python3.2mu -c src/cpp/cuda.cpp -o build/temp.linux-x86_64-3.2/src/cpp/cuda.o
Inf ile included from src/cpp/cuda.cpp:1:0:
src/cpp/cuda.hpp:12:18: fatal error: cuda.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

What should I do?

EDIT: My OS is: Arch Linux 3.3.2.1. GPU: Nvidia GF 9600M GS

2
those instructions you linked to are for installing pycuda. What is it you are trying to do? - talonmies
Sorry, I've forgot to say that I'm tryint to install pycuda of course. - sortris
Do you have the a supported CUDA toolkit and matching driver installed? - talonmies
I've installed CUDA-toolkit (pacman -S cuda-toolkit), my Nvidia Driver Version: 295.40. How can I check if drivers matches? - sortris
It is possible that your toolkit is installed in a non standard place by your package manager. Note the use of --cuda-root=... in the wiki you have linked to. You will need to find the CUDA toolkit and specify its path to the installer. - talonmies

2 Answers

-1
votes

Instead of su -c "make install" try sudo su - (to become root), and then, as root: make install (after navigating to the right directory)

-1
votes

This one full command worked for me:

sudo pip3 install --global-option=build_ext --global-option="-I/usr/local/cuda/include" --global-option="-L/usr/local/cuda/lib64" pycuda