CUDA is not available

I installed CUDA 10.1.105 and reinstall NVIDIA driver 430.64 , cuDnn 7.6.5 even Anaconda because of no available

python -m torch.utils.collect_env
Collecting environment information...
PyTorch version: 1.3.1
Is debug build: No
CUDA used to build PyTorch: Could not collect

OS: Ubuntu 18.04.4 LTS
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CMake version: version 3.10.2

Python version: 3.7
Is CUDA available: No
CUDA runtime version: 10.1.105
GPU models and configuration: GPU 0: GeForce RTX 2080 Ti
Nvidia driver version: 430.64
cuDNN version: Probably one of the following:

Versions of relevant libraries:
[pip3] numpy==1.19.1
[pip3] torch==1.3.1
[pip3] torchvision==0.4.2

But till

>>> import torch
>>> print(torch.cuda.is_available())
>>> exit()

Please, I need help , solution or sth

You don’t need local CUDA and cudnn installations, if you are using the conda binary.
Only the NVIDIA driver will be used.
Based on the output you are seeing, I assume you’ve installed the CPU binary.
Could you reinstall PyTorch with the desired CUDA version using the install command from here and post the install log, if it’s still not working?

Thnaks. It’s working. I find this problem occur because of uncorrelation of Pytorch , cuda and cudnn.

What do you mean by uncorrelation?
Even I am facing the same issue.

You’ve installed the CPU-only binary as seen in your screenshot: PyTorch version: 1.12.1+cpu.

I tried uninstalling PyTorch and it says the package not found after the process is completed.

But again when I run the command python -m torch.utils.collect_env the Pytorch version can be seen. I also tried to install it again using the link:conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch, but the CPU binary is always there.

Try to uninstall it via pip uninstall torch, which should remove the CPU-only binary. Once this is done, try to install a binary with a CUDA runtime.