beluga
November 14, 2023, 11:35am
1
I follow the official guide to install cuda-toolkit on wsl2
check the wsl kernel version and windows10 version
install nvidia driver
copy the following command to my shell
but when I finish, i try to use nvcc, it reports “Command ‘nvcc’ not found”
So can anyone gives me some suggestions?
so what was the output of running sudo apt-get -y install cuda-toolkit-12-3 ?
It all depends on whether this step was successful or not.
beluga
November 14, 2023, 2:01pm
3
I think cuda-toolkit was installed successfully. But somehow it doesn’t work :(
You could check if subdirectories like
/usr/local/cuda
or
/usr/local/cuda-12.3
have been created. If so, there should be bin and lib subdirectories inside. These need to be in the PATH and LD_LIBRARY_PATH environment variables respectively.
This can be done in your ~/.bashrc script (assuming your Linux is using bash) with commands like
export PATH=/usr/local/cuda-12.3/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-12.3/lib:$LD_LIBRARY_PATH
2 Likes
beluga
November 14, 2023, 2:53pm
5
Thanks for your help! It turns out I just forgot to add “/usr/loca/cuda/bin” to $PATH.
system
Closed
November 28, 2023, 2:54pm
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.