【问题标题】:Installing pycuda on google colab在 google colab 上安装 pycuda
【发布时间】:2018-11-18 06:50:47
【问题描述】:

我想在 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

【问题讨论】:

  • 你能把所有的错误都加进去吗?

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


【解决方案1】:

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

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

【讨论】: