Why 'torch.cuda.is_available()' still returned 'False' even I installed CUDA 9.0.176.....Help

Dee_Ma: <p>Hi,</p>
<p>I just got a very strange problem:</p>
<p>I used the commands: “print(torch.  <strong>version</strong>  )<br>
print(torch.version.cuda)<br>
print(torch.bac:sob:kends.cudnn.version())”, the output were:</p>
<p>0.4.1.post2 (PyTorch version)<br>
9.0.176 (CUDA version)<br>
7.1.2 (cuDNN version)</p>
<p>I also used the “nvcc --version”, the results were:<br>
<img src="https://discuss.pytorch.org/uploads/default/original/2X/8/8d9cc497380040f88798dfdfff4a0a63ded6a075.png" alt="Capture4" width="367" height="62"></p>
<p>It was very strange, it seems that the CUDA version installed in Linux system is 9.0.176, and the CUDA that the PyTorch needed is also 9.0.176, but, the “cuda.is_available()” still returns "  <strong>False</strong>  ".</p>
<p>Could anyone help me with this?<img src="https://discuss.pytorch.org/images/emoji/apple/sob.png?v=12" title=":sob:" class="emoji" alt=":sob:" loading="lazy" width="20" height="20"> Many thanks!</p>
<h2><a name="environment-1" class="anchor" href="#environment-1"></a>Environment</h2>
<ul>
<li>PyTorch Version (e.g., 1.0): 0.4.1.post2</li>
<li>OS (e.g., Linux): Linux</li>
<li>Python version: 3.6.5 : : Anaconda, Inc.</li>
<li>CUDA/cuDNN version: 9.0.176 (CUDA version); 7.1.2 (cuDNN version)</li>
</ul>

smth: <p>Can you try PyTorch 1.0.0, i.e. the latest version of PyTorch?</p>
<p>Also, is the nvidia driver the latest version on your machine?</p>

Dee_Ma: <p>Hi Smth,</p>
<p>Many thansk for your help. As I am using the University’s HPC machine-I don’t have permission to install any software unless report this issue to staff and they may update it after Christmas holiday.<img src="https://discuss.pytorch.org/images/emoji/apple/sob.png?v=6" title=":sob:" class="emoji" alt=":sob:"></p>
<p>In addition, I also use "nvidia-smi’ command to check the NVIDIA driver version, however, it shown: command not found… I am not sure the version of NVIDIA driver.</p>
<p>May I ask if this issue mainly caused by the incompatible versions?</p>
<p>Thanks.</p>

Dee_Ma: <p>Hi Smth,</p>
<p>Thanks for your reply. May I ask if there is any other possible solution for this?</p>
<p>Thanks.</p>

Dee_Ma: <p>Hi Smth,</p>
<p>Many thansk for your help. As I am using the University’s HPC machine-I don’t have permission to install any software unless report this issue to staff and they may update it after Christmas holiday.<img src="https://discuss.pytorch.org/images/emoji/apple/sob.png?v=6" title=":sob:" class="emoji" alt=":sob:"></p>
<p>In addition, I also use "nvidia-smi’ command to check the NVIDIA driver version, however, it shown: command not found… I am not sure the version of NVIDIA driver.</p>
<p>May I ask if this issue mainly caused by the incompatible versions?</p>
<p>Thanks.</p>

smth: <p>One solution is to try the CUDA8 version of PyTorch that you can install by selecting it from <a href="https://pytorch.org" rel="nofollow noopener">https://pytorch.org</a></p>
<p><code>torch.cuda.is_available()</code> can return false if you dont have a new enough NVIDIA driver that your CUDA version needs.</p>

Dee_Ma: <p>Hi Smth,</p>
<p>Many thanks for your help. I will try it.<img src="https://discuss.pytorch.org/images/emoji/apple/slightly_smiling_face.png?v=6" title=":slightly_smiling_face:" class="emoji" alt=":slightly_smiling_face:"></p>

TMY: <p>Hello,<br>
I am facing the same problem and tried all the options discussed here, But did not work. Can somebody please help me to solve this problem.</p>
<p>OS: linux<br>
pytorchVesion: 1.0.1<br>
Python version : 3.7.3<br>
Cuda : 9.0.176<br>
Driver vesion: 396.24</p>
<p>Thank you</p>

ptrblck: <p><a class="mention" href="/u/tmy">@TMY</a><br>
Answered <a href="https://discuss.pytorch.org/t/torch-cuda-is-available-is-false-after-cuda-9-0-176-installed-could-anyone-help-me-with-this-thanks/33360/3">here</a>.</p>

Exlsunshine: <p>really helped a lot! after upgrading to the latest NVIDIA driver, torch.cuda.is_available() returns True!</p>