# Torch not compiled with CUDA enabled

**URL:** https://forums.developer.nvidia.com/t/torch-not-compiled-with-cuda-enabled/271096
**Category:** CUDA Setup and Installation
**Tags:** pytorch, ubuntu, cuda
**Created:** [October 29, 2023, 6:42pm UTC](https://forums.developer.nvidia.com/t/torch-not-compiled-with-cuda-enabled/271096 "2023-10-29T18:42:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![huangtianhao9](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@huangtianhao9](https://forums.developer.nvidia.com/u/huangtianhao9)
#### Post date: [October 29, 2023, 6:42pm UTC](https://forums.developer.nvidia.com/t/torch-not-compiled-with-cuda-enabled/271096/1 "2023-10-29T18:42:15Z")

</div>

Hi,

I’m working on the Ubuntu 20.04 with GTX 1080 Ti.

I created a conda env and assign the python=3.9. Later i installed cudatoolkit 11.8 with the command  
`conda install -c "nvidia/label/cuda-11.8.0" cuda-toolkit`  
and installed pytorch with  
`conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia`.

But then the sequence of commands:

```auto
import torch

print(torch.cuda.is_available())

torch.zeros(1).cuda()

```

returned False and raised error: Torch not compiled with CUDA enabled respectively.

I thought it could be the compatibility problem, but i checked the cersions of pytorch, cuda, gpu version, there’s nothing wrong. Could some give me some suggestions?
