OK. It is getting very confusing to me. Since you told me I could be using another conda environment (I activated the new environment… besides, my base environment also has correct pytorch installed anyways) I tried running the code in terminal instead of running it on the file.
It returns the wanted value! (ie torch.version.cuda returns 11.1 and torch.cuda.is_available() returns true)
However if I run the file which only has
import torch
print(torch.version.cuda)
print(torch.cuda.is_available())
it returns
None
False
Clearly I am too much of a newbie to understand what is going on?!