Everything worked fine for about 2 years. Unexpectedly, I discovered an error connecting to CUDA today.
Now the torch.cuda.is_available() function is False, and the torch.zeros(1).cuda() command returns the error: Torch is not compiled with CUDA enabled. It’s very similar to the fact that I have a version of torch installed without CUDA, but I didn’t change anything and just a couple of days ago I was quietly using CUDA.
If you type “nvidia-smi” into the console:
NVIDIA-SMI 576.02 Driver Version: 576.02 CUDA Version: 12.9
…
I deleted torch to reinstall it, but an error occurs when trying to install it:
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/сu129
WARNING: Ignoring invalid distribution -illow
WARNING: Ignoring invalid distribution -pencv-python
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
I tried other variations of the installation commands, but nothing works, the errors are similar:
pip3 install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128
and other versions of cu121, cu126, cu130
pip install torch==2.9.0+cu128 --index-url https://download.pytorch.org/whl/cu128
Looking in indexes: https://download.pytorch.org/whl/cu128
ERROR: Could not find a version that satisfies the requirement torch==2.9.0+cu128 (from versions: none)
ERROR: No matching distribution found for torch==2.9.0+cu128
I have Python 3.10.2 (64bit)
How do I install pytorch with CUDA? Why did everything work on CUDA a couple of days ago, but now it doesn’t? In the Task Manager, I made sure that CUDA is present, but something prevents me from installing and connecting the library to it.