OK I created new environment and installed pytorch on new environment with the following command as recommended by the website.
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge
still torch.version.cuda returns None.
Any suggestions or anything else I can try to give you more information?