[Python] Installing pycuda on google colab

Discussão em 'Python' iniciado por Stack, Fevereiro 18, 2025.

  1. Stack

    Stack Membro Participativo

    I want to install pycuda on google colab. I tried pip install pycuda but it gives WARNING: nvcc not in path. May need to set CUDA_INC_DIR for installation to succeed

    After reading some blog, I also did !export PATH=/usr/local/cuda/bin:$PATH and !export CUDA_ROOT=/usr/local/cuda but still it gives the same error.

    Also, while terminating installation it also displays

    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

    Continue reading...

Compartilhe esta Página