# Why 'torch.cuda.is\_available()' still returned 'False' even I installed CUDA 9.0.176.....Help

**URL:** <https://discuss.pytorch.org/t/why-torch-cuda-is-available-still-returned-false-even-i-installed-cuda-9-0-176-help/33364>\
**Category:** Uncategorized\
**Created:** [December 29, 2018, 4:00pm UTC](https://discuss.pytorch.org/t/why-torch-cuda-is-available-still-returned-false-even-i-installed-cuda-9-0-176-help/33364 "2018-12-29T16:00:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dee\_Ma](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@Dee\_Ma](https://discuss.pytorch.org/u/Dee_Ma)\
**Post date:** [December 29, 2018, 4:00pm UTC](https://discuss.pytorch.org/t/why-torch-cuda-is-available-still-returned-false-even-i-installed-cuda-9-0-176-help/33364/1 "2018-12-29T16:00:23Z")

</div>

Hi,

I just got a very strange problem:

I used the commands: “print(torch. **version** )  
print(torch.version.cuda)  
print(torch.bac:sob:kends.cudnn.version())”, the output were:

0.4.1.post2 (PyTorch version)  
9.0.176 (CUDA version)  
7.1.2 (cuDNN version)

I also used the “nvcc --version”, the results were:  
 ![Capture4](https://discuss.pytorch.org/uploads/default/original/2X/8/8d9cc497380040f88798dfdfff4a0a63ded6a075.png)

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 " **False**".

Could anyone help me with this?😭 Many thanks!

## Environment

- PyTorch Version (e.g., 1.0): 0.4.1.post2
- OS (e.g., Linux): Linux
- Python version: 3.6.5 : : Anaconda, Inc.
- CUDA/cuDNN version: 9.0.176 (CUDA version); 7.1.2 (cuDNN version)

---

<div class="post-metadata">

**Author:** ![smth](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/smth/32/13_2.png) [@smth](https://discuss.pytorch.org/u/smth)\
**Post date:** [December 29, 2018, 4:13pm UTC](https://discuss.pytorch.org/t/why-torch-cuda-is-available-still-returned-false-even-i-installed-cuda-9-0-176-help/33364/2 "2018-12-29T16:13:18Z")

</div>

Can you try PyTorch 1.0.0, i.e. the latest version of PyTorch?

Also, is the nvidia driver the latest version on your machine?

---

<div class="post-metadata">

**Author:** ![Dee\_Ma](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@Dee\_Ma](https://discuss.pytorch.org/u/Dee_Ma)\
**Post date:** [December 29, 2018, 4:36pm UTC](https://discuss.pytorch.org/t/why-torch-cuda-is-available-still-returned-false-even-i-installed-cuda-9-0-176-help/33364/3 "2018-12-29T16:36:03Z")

</div>

Hi Smth,

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.😭

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.

May I ask if this issue mainly caused by the incompatible versions?

Thanks.

---

<div class="post-metadata">

**Author:** ![Dee\_Ma](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@Dee\_Ma](https://discuss.pytorch.org/u/Dee_Ma)\
**Post date:** [December 29, 2018, 5:27pm UTC](https://discuss.pytorch.org/t/why-torch-cuda-is-available-still-returned-false-even-i-installed-cuda-9-0-176-help/33364/4 "2018-12-29T17:27:54Z")

</div>

Hi Smth,

Thanks for your reply. May I ask if there is any other possible solution for this?

Thanks.

---

<div class="post-metadata">

**Author:** ![Dee\_Ma](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@Dee\_Ma](https://discuss.pytorch.org/u/Dee_Ma)\
**Post date:** [December 29, 2018, 5:28pm UTC](https://discuss.pytorch.org/t/why-torch-cuda-is-available-still-returned-false-even-i-installed-cuda-9-0-176-help/33364/5 "2018-12-29T17:28:34Z")

</div>

Hi Smth,

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.😭

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.

May I ask if this issue mainly caused by the incompatible versions?

Thanks.

---

<div class="post-metadata">

**Author:** ![smth](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/smth/32/13_2.png) [@smth](https://discuss.pytorch.org/u/smth)\
**Post date:** [December 29, 2018, 6:40pm UTC](https://discuss.pytorch.org/t/why-torch-cuda-is-available-still-returned-false-even-i-installed-cuda-9-0-176-help/33364/7 "2018-12-29T18:40:43Z")

</div>

One solution is to try the CUDA8 version of PyTorch that you can install by selecting it from [https://pytorch.org](https://pytorch.org)

`torch.cuda.is_available()` can return false if you dont have a new enough NVIDIA driver that your CUDA version needs.

---

<div class="post-metadata">

**Author:** ![Dee\_Ma](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@Dee\_Ma](https://discuss.pytorch.org/u/Dee_Ma)\
**Post date:** [December 29, 2018, 9:38pm UTC](https://discuss.pytorch.org/t/why-torch-cuda-is-available-still-returned-false-even-i-installed-cuda-9-0-176-help/33364/8 "2018-12-29T21:38:37Z")

</div>

Hi Smth,

Many thanks for your help. I will try it.🙂

---

<div class="post-metadata">

**Author:** ![TMY](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/t/67e7ee/32.png) [@TMY](https://discuss.pytorch.org/u/TMY)\
**Post date:** [May 22, 2019, 1:24am UTC](https://discuss.pytorch.org/t/why-torch-cuda-is-available-still-returned-false-even-i-installed-cuda-9-0-176-help/33364/9 "2019-05-22T01:24:45Z")

</div>

Hello,  
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.

OS: linux  
pytorchVesion: 1.0.1  
Python version : 3.7.3  
Cuda : 9.0.176  
Driver vesion: 396.24

Thank you

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [May 22, 2019, 11:05am UTC](https://discuss.pytorch.org/t/why-torch-cuda-is-available-still-returned-false-even-i-installed-cuda-9-0-176-help/33364/10 "2019-05-22T11:05:35Z")

</div>

@TMY  
Answered [here](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).

---

<div class="post-metadata">

**Author:** ![Exlsunshine](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/exlsunshine/32/23099_2.png) [@Exlsunshine](https://discuss.pytorch.org/u/Exlsunshine)\
**Post date:** [April 21, 2020, 10:06am UTC](https://discuss.pytorch.org/t/why-torch-cuda-is-available-still-returned-false-even-i-installed-cuda-9-0-176-help/33364/11 "2020-04-21T10:06:38Z")

</div>

really helped a lot! after upgrading to the latest NVIDIA driver, torch.cuda.is\_available() returns True!
