Print(torch.cuda.is_available()) shows False when CUDA is detected

This is my test.py file, running in Windows Powershell:

import torch
import transformers
import requests
print(torch.cuda.is_available())

How do I get a True?


This isn’t the right place to ask for help with torch. Torch has a discussion forum (discuss.pytorch.org) that you may wish to use. If you believe there is a problem with your CUDA installation then verify the CUDA installation using the method indicated in the setup guide. Questions about CUDA setup should be asked on the CUDA setup and installation sub-forum.