Ahsanr312/Installing-CUDA-Toolkit-cuDNN-OpenCV-and-PyTorch-on-Ubuntu-20.04

Command 'nvcc' not found

Opened this issue · 1 comments

After installing cuDNN, I had reboot my computer and then check

nvidia-smi

it works fine
but when I try

nvcc --version 

It says

Command 'nvcc' not found, but can be installed with:

sudo apt install nvidia-cuda-toolkit

So what to do, Do I have to run

sudo apt install nvidia-cuda-toolkit

or simply go with next step

Try this:
1.
cd ~
sudo gedit .bashrc

Add the following at the end of ~/.bashrc. Replace "abcpath" below with your own path and save the file
export LD_LIBRARY_PATH=abcpath/cuda/lib64:$LD_LIBRARY_PATH

source .bashrc

Reboot