Conda environment is not running as I expected

Viewed 22

I am using a new conda environment and playing around with Pytorch. I just want to make sure my GPU is running so then I run the code print(torch.cuda.is_available()). When I try to run the script, it returns False.

Command of running test.py image: enter image description here

test.py code image:

enter image description here

However, when I run python on conda prompt, it returns True. I have no idea how this is possible.

Command image: enter image description here

Can anybody tell me where I did wrong? Thank you!

0 Answers
Related