Cuda error CUDA must be available in order to use Deep Daze

Burger: <p>I am new to using python and PyTorch, I am trying to make some arts using Deep Daze and Big Sleep however, and getting errors saying Cuda is not available even after reinstalling Cuda and Nvidia drivers.</p>

ptrblck: <p>Depending on the way you’ve installed PyTorch, either your local CUDA toolkit (if you’ve built PyTorch from source) or the shipped CUDA runtime will be used (if you’ve installed the conda binaries or pip wheels).<br>
I’m not familiar with the “Deep Daze” and “Big Sleep” implementations and don’t know, if custom CUDA extensions are used. If so, then you would also need a working local CUDA toolkit in order to be able to compile it.</p>
<p>In any way, are you able to use the GPU in a PyTorch-only script?</p>

Burger: <p>I’m really new to using python and everything so how would I go about testing if I can use my gpu in a PyTorch Script? I use anaconda so would I have to create a new instance with only the PyTorch script and run some sort of test?</p>
<p>Thanks for your help so far!</p>

ptrblck: <p>You could run:</p>
<pre><code class="lang-python">import torch
x = torch.randn(1).cuda()
print(x)
</code></pre>
<p>If this code snippet is showing a random tensor on a <code>cuda</code> device, your environment looks alright.</p>
<p>Also, if that’s the case, we would need to get more information about the error you are seeing.<br>
Could you post the complete stack trace here, please?</p>

Burger: <p>Ok I’m not sure if I am doing something wrong however anaconda does not recognize import as a command, I will post the error I have been getting<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/3/e/3e6f8bef70f98b3dfeb618acad005889d06149c9.png" data-download-href="https://discuss.pytorch.org/uploads/default/3e6f8bef70f98b3dfeb618acad005889d06149c9" title="Error"><img src="https://discuss.pytorch.org/uploads/default/original/3X/3/e/3e6f8bef70f98b3dfeb618acad005889d06149c9.png" alt="Error" data-base62-sha1="8UkACFiGWSbcI5pISMz0BMIMQTD" width="690" height="163" data-dominant-color="1B1B1B"><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">Error</span><span class="informations">967×229 7.95 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>

D4RK: <p>I have exactly the same problem, i hope someone knows the fix</p>

Burger: <p>Hey dark, I figured out how to solve my issue and I hope it works for you, I found a stack overflow post with the same problem as me “<a href="https://stackoverflow.com/questions/62359175/pytorch-says-that-cuda-is-not-available" class="inline-onebox" rel="noopener nofollow ugc">linux - Pytorch says that CUDA is not available - Stack Overflow</a>” and it recommended going to the PyTorch website and installing a specific version of pytorch using their install command generator or whatever, let me know if that doesn’t work.</p>

The_Mimic: <p>Do:<br>
pip install deep-daze</p>

maxzzzz1: <p>I have the exact problem ? found a solution ?</p>