我想在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
答案 0 :(得分:1)
此脚本也安装了pycuda
所需的软件包:
!curl https://colab.chainer.org/install | sh -