# Problem with pytorch and cuda installation

**URL:** <https://discuss.pytorch.org/t/problem-with-pytorch-and-cuda-installation/207413>\
**Category:** windows\
**Created:** [August 1, 2024, 7:04pm UTC](https://discuss.pytorch.org/t/problem-with-pytorch-and-cuda-installation/207413 "2024-08-01T19:04:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jothi\_mani](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/jothi_mani/32/71875_2.png) [@Jothi\_mani](https://discuss.pytorch.org/u/Jothi_mani)\
**Post date:** [August 1, 2024, 7:04pm UTC](https://discuss.pytorch.org/t/problem-with-pytorch-and-cuda-installation/207413/1 "2024-08-01T19:04:49Z")

</div>

I tried to install pytorch with cuda enabled using the following command in conda prompt: conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia.  
but I got the following error: (‘Connection broken: IncompleteRead(217545068 bytes read, 176616422 more expected)’, IncompleteRead(217545068 bytes read, 176616422 more expected)).

I am not sure what this means to me. Could anyone please explain why this is happening?

---

<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:** [August 12, 2024, 7:44pm UTC](https://discuss.pytorch.org/t/problem-with-pytorch-and-cuda-installation/207413/2 "2024-08-12T19:44:40Z")

</div>

It seems your internet connection might have issues so you might want to retry the download.

---

<div class="post-metadata">

**Author:** ![robertopfneto](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/robertopfneto/32/75266_2.png) [@robertopfneto](https://discuss.pytorch.org/u/robertopfneto)\
**Post date:** [January 23, 2025, 5:22pm UTC](https://discuss.pytorch.org/t/problem-with-pytorch-and-cuda-installation/207413/3 "2025-01-23T17:22:45Z")

</div>

I tried this and not working. Is the same error when I run the install command

---

<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:** [January 23, 2025, 7:09pm UTC](https://discuss.pytorch.org/t/problem-with-pytorch-and-cuda-installation/207413/4 "2025-01-23T19:09:55Z")

</div>

Works for me:

```python
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
...
The following packages will be downloaded:

    package | build
    ---------------------------|-----------------
...
   pytorch-2.5.1 |py3.10_cuda11.8_cudnn9.1.0_0 1.54 GB pytorch
    pytorch-cuda-11.8 | h7e8668a_6 7 KB pytorch
    pytorch-mutex-1.0 | cuda 3 KB pytorch
    pyyaml-6.0.2 | py310h5eee18b_0 193 KB
    requests-2.32.3 | py310h06a4308_1 101 KB
    sympy-1.13.3 | py310h06a4308_0 11.3 MB
    torchaudio-2.5.1 | py310_cu118 6.2 MB pytorch
    torchtriton-3.1.0 | py310 233.5 MB pytorch
    torchvision-0.20.1 | py310_cu118 8.3 MB pytorch
...

```

```python
python -c "import torch; print(torch. __version__ ); print(torch.version.cuda); print(torch.randn(1).cuda())"                                                                                                                              
2.5.1                                                                                                                                                                                                                                                                             
11.8                                                                                                                                                                                                                                                                              
tensor([-1.2686], device='cuda:0')    

```
