在Google Colab上安装pycuda

时间:2018-06-26 18:55:12

标签: python python-3.x google-colaboratory pycuda

我想在google colab上安装pycuda。 我尝试了pip install pycuda,但它给出了WARNING: nvcc not in path. May need to set CUDA_INC_DIR for installation to succeed

在阅读了一些博客之后,我也做了!export PATH=/usr/local/cuda/bin:$PATH!export CUDA_ROOT=/usr/local/cuda,但仍然出现相同的错误。

此外,在终止安装时,它还会显示

In file included from src/cpp/cuda.cpp:1:0:
src/cpp/cuda.hpp:14:10: 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

1 个答案:

答案 0 :(得分:1)

此脚本也安装了pycuda所需的软件包:

!curl https://colab.chainer.org/install | sh -