ERROR: nvcc not found when install pycuda on xavier

when i try to install pycuda this error shows up

sudo sh ./install_pycuda.sh

ERROR: nvcc not found

How can i fix that?

Hi @gurselturkeri, can you confirm that you have CUDA Toolkit installed?

/usr/local/cuda/bin/nvcc --version

If you are able to run that, you may want to add this to your ~/.bashrc to have CUDA in your environment’s PATH:

export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64\
                         ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

my version:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Feb_28_22:34:44_PST_2021
Cuda compilation tools, release 10.2, V10.2.300
Build cuda_10.2_r440.TC440_70.29663091_0

in bashrc already has

export PATH=/usr/local/cuda-10.2/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH

I’m solving with these:
I add cuda path in where pycuda install file by using terminal.

export PATH=/usr/local/cuda-10.2/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH

then sudo sh ./install_pycuda.sh is work

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.