Torch.cuda.is_available() is false after installing PyTorch via conda


Does CUDA install automatically by installing PyTorch? I run the command to install PyTorch following

conda install pytorch torchvision cudatoolkit=10.0 -c pytorch

torch.cuda.is_available is false after this command.
However, I see a similar discussion in Will "conda install pytorch torchvision -c pytorch" also install CUDA and cuDNN?, and they said yes…

What’s wrong?

You have to check if your nvidia-driver and cuda versions are compatible with the pytorch version you want to install. I have pytorch=1.2 with cuda 10 and nvidia-driver 410 on my system. I think you can use this command if your nvidia driver and cuda versions are as I mentioned:
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch

You are right. Thank you!