So does this mean that installing cudatoolkit=10.1(and pytorch) for cuda version 10.2 can solve the problem?
I met the same problem and tried the suggestion for a server with cuda 10.2:
conda install pytorch torchvision cudatoolkit=10.1

However when I tried moving a tensor to cuda an error occurred:
AssertionError: Torch not compiled with CUDA enabled

What’s wrong with that? Actually I thought for the server installed with cuda 10.2, it should be reasonable to install pytorch with cudatoolkit=10.2 rather than 10.1. So I’m also confused with the previous suggestion.
Hope for your reply!
PS: I have also tried installing pytorch with cudatoolkit=10.2 and got the same error as before…