Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

2.1K
Views
Why `torch.cuda.is_available()` returns False even after installing pytorch with cuda?

On a Windows 10 PC with an NVidia GeForce 820M I installed CUDA 9.2 and cudnn 7.1 successfully, and then installed PyTorch using the instructions at pytorch.org.

Specifically I used the command

pip install torch==1.4.0+cu92 torchvision==0.5.0+cu92 -f https://download.pytorch.org/whl/torch_stable.html

because i use pip and not Anaconda.

Yet I get the following

>>> import torch
>>> torch.cuda.is_available()
False

Why is this happening?

over 4 years ago · Santiago Trujillo
4 answers
Answer question

0

To solve this issue, the following method answered for me:

1- First you have to update Anaconda.

2- In your notebook, select the following based on your system.

https://pytorch.org/

enter image description here

example for Windows:(This may take some time. Be patient)

conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

3- Find and install the latest graphics card for your system through the following site:

https://www.nvidia.com/Download/index.aspx

enter image description here

4- Supported CUDA level of GPU and card. see this

over 4 years ago · Santiago Trujillo Report

0

I want to share also my experience, especially in the WSL2 environment. See my post here.

Despite I had installed the correct and latest drivers following the guide provided by NVidia here, my WSL was not able to detect any GPU both in PyTorch and in the whole environment.

My GPU is Nvidia GeForce RTX 1650 Ti, which is not listed in the Wiki link above but is actually shown in the NVidia page.

Downgrading to an older driver version found at this NVidia link, namely Driver Version: 472.39 helped me out. Now PyTorch can correctly detect the driver, as well as I can run containers that require GPU access since it is correctly found and used.

Hoping this will help someone in my situation.

over 4 years ago · Santiago Trujillo Report

0

ok here's my experience my system is ubuntu 20.4, gpu - nvidi gtx 1060

when i go and change run the 'Nvidia X Server Settings' application i found under the PRIME Profiles Nvidia On-Demand or Inter(power saving mode) is selected

giving torch.cuda.is_available() to False

i changed the GPU Mode to 'NVIDIA(Performance Mode) then i got True

NVIDIA X Server Setting-GUI

over 4 years ago · Santiago Trujillo Report

0

The same error can appear when the version of your Pytorch supports different CUDA. For example, my Pytorch version was with CUDA 8.0 support, but I had CUDA 9.0 installed. To fix that I had to upgrade my Pytorch to cu90 like this:

pip install torch_nightly -f https://download.pytorch.org/whl/nightly/cu90/torch_nightly.html

Reference: here

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!