CUDA is not available

ImportYang_Howard: <p>I installed CUDA 10.1.105 and reinstall NVIDIA driver 430.64 , cuDnn 7.6.5 even Anaconda because of no available</p>
<pre><code class="lang-auto">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:
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5
/usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudnn.so.7.6.5

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

</code></pre>
<p>But till</p>
<pre><code class="lang-auto">&gt;&gt;&gt; import torch
&gt;&gt;&gt; print(torch.cuda.is_available())
False
&gt;&gt;&gt; exit()
</code></pre>
<p>Please, I need help ,  solution or sth</p>

ptrblck: <p>You don’t need local CUDA and cudnn installations, if you are using the conda binary.<br>
Only the NVIDIA driver will be used.<br>
Based on the output you are seeing, I assume you’ve installed the CPU binary.<br>
Could you reinstall PyTorch with the desired CUDA version using the install command from <a href="https://pytorch.org/get-started/locally/">here</a> and post the install log, if it’s still not working?</p>

ImportYang_Howard: <p>Thnaks. It’s working. I find this problem occur because of  uncorrelation of  Pytorch , cuda and cudnn.</p>

SURYA_PRAKASH: <p>What do you mean by uncorrelation?<br>
Even I am facing the same issue.</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/f/d/fd14f0f92779aa6a39d24e9c4166060e5d7a045f.png" data-download-href="https://discuss.pytorch.org/uploads/default/fd14f0f92779aa6a39d24e9c4166060e5d7a045f" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/f/d/fd14f0f92779aa6a39d24e9c4166060e5d7a045f.png" alt="image" data-base62-sha1="A6RFkeU6VvtOYpqIt0JsMx9IT1R" width="690" height="358" data-dominant-color="151515"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1169×607 33.3 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

ptrblck: <p>You’ve installed the CPU-only binary as seen in your screenshot: <code>PyTorch version: 1.12.1+cpu</code>.</p>

SURYA_PRAKASH: <p>I tried uninstalling PyTorch and it says the package not found after the process is completed.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/f/3/f35a248ca7e39ed1ab673a95aac6c1a8e091ebd3.png" data-download-href="https://discuss.pytorch.org/uploads/default/f35a248ca7e39ed1ab673a95aac6c1a8e091ebd3" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/f/3/f35a248ca7e39ed1ab673a95aac6c1a8e091ebd3.png" alt="image" data-base62-sha1="yIN9D26iCjyAp65aOitgQJDF0dB" width="689" height="333" data-dominant-color="141414"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1196×578 17.2 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>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.</p>

ptrblck: <p>Try to uninstall it via <code>pip uninstall torch</code>, which should remove the CPU-only binary. Once this is done, try to install a binary with a CUDA runtime.</p>

ptrblck: <p>“Binary” refers to the pip wheel or conda binary in this case.<br>
My recommendation is to uninstall all CPU-only wheels, and reinstall the PyTorch wheel with the desired CUDA runtime.</p>

ptrblck: <aside class="quote no-group quote-post-not-found" data-username="Wisarut_HAKAEN" data-post="10" data-topic="95550">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/wisarut_hakaen/48/55570_2.png" class="avatar"> Wisarut_HAKAEN:</div>
<blockquote>
<p>NotImplementedError: Could not run ‘torchvision::nms’ with arguments from the ‘CUDA’ backend.</p>
</blockquote>
</aside>
<p>It seems the error is raised due to a missing kernel in <code>torchvision</code> so make sure you’ve also installed the right <code>torchvision</code> build with all CUDA kernels.</p>

Wisarut_HAKAEN: <p>anyway pls tell me how can I remove CUDA 11.7 I need to use CUDA 11.3</p>