How to install nvcc for conda-installed PyTorch in Ubuntu

less than 1 minute read

When we install PyTorch using conda (e.g.,conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch), it incompletly installs the cudatoolkit, which means that we cannot use nvcc provided by the cudatoolkit.

Following commands will help for completely installing the cudatoolkit:

>> wget
>> sh ./ --no-opengl-libs --toolkit --silent --override

Note: Make sure to set export CUDA_HOME=/usr/local/cuda in the shell configuration file (i.e., .bashrc or .zshrc).