ARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(140):

Sotor: <p>I have  been trying to download pytorch and this is error message i get: Could not remove or rename C:\ProgramData\Anaconda3\pkgs\pytorch-1.5.1-py3.7_cuda102_cudnn7_0\Lib\site-packages\torch\lib\cudnn64_7.dll.  Please remove this file manually (you may need to reboot to free file handles)<br>
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(140): Could not remove or rename C:\ProgramData\Anaconda3\pkgs\pytorch-1.5.1-py3.7_cuda102_cudnn7_0\Lib\site-packages\torch\lib\cudnn64_7.dll.  Please remove this file manually (you may need to reboot to free file handles)</p>

ptrblck: <p>It seems <code>conda</code> is trying to remove the mentioned file, but isn’t able to do so.<br>
Did you try to remove it manually (or reboot and remove it) as suggested in the error message?</p>

Sotor: <p>i have done that and i was able to install pytorch, however when i import pytorch i get the following error what do i do?<br>
Traceback (most recent call last):<br>
File “”, line 1, in <br>
File “C:\ProgramData\Anaconda3\lib\site-packages\torch_<em>init</em>_.py”, line 103, in <br>
raise err<br>
OSError: [WinError 126] The specified module could not be found. Error loading “C:\ProgramData\Anaconda3\lib\site-packages\torch\lib\caffe2_nvrtc.dll” or one of its dependencies.</p>

peterjc123: <p>Couple of questions:</p>
<ol>
<li>Do you have the Nvidia GPU card plugged in? Have you installed the GPU driver for your Nvidia card?</li>
<li>Have you installed VS 2019 Redist <a href="https://aka.ms/vs/16/release/vc_redist.x64.exe" rel="nofollow noopener">https://aka.ms/vs/16/release/vc_redist.x64.exe</a>?</li>
<li>There isn’t <code>raise err</code> in line 103 of <code>__init__.py</code> for v1.5.1 binaries. Are you sure you installed the correct version? See <a href="https://github.com/pytorch/pytorch/blob/v1.5.1/torch/__init__.py" rel="nofollow noopener">https://github.com/pytorch/pytorch/blob/v1.5.1/torch/__init__.py</a>
</li>
</ol>

Sotor: <p>No, please how do i go about achieving your questions: to install<br>
1.Nvidia GPU card plugin<br>
2.VS 2019 Redist</p>

peterjc123: <ol>
<li>Search, download and install the GPU driver at <a href="https://www.nvidia.com/download/index.aspx?lang=en-us" rel="nofollow noopener">https://www.nvidia.com/download/index.aspx?lang=en-us</a>
</li>
<li>Download and install <a href="https://aka.ms/vs/16/release/vc_redist.x64.exe" rel="nofollow noopener">https://aka.ms/vs/16/release/vc_redist.x64.exe</a>
</li>
</ol>

fawaz: <p>JUST write this command<br>
conda update -n base  conda-package-handling</p>

Dami89: <p>please how can i remove it manually</p>

ptrblck: <p>Check the file <code>conda</code> is unable to delete e.g. as seen here:</p>
<pre><code class="lang-python">Could not remove or rename C:\ProgramData\Anaconda3\pkgs\pytorch-1.5.1-py3.7_cuda102_cudnn7_0\Lib\site-packages\torch\lib\cudnn64_7.dll. Please remove this file manually (you may need to reboot to free file handles)
</code></pre>
<p>and remove it either from the terminal (via <code>rm</code>) or using your Windows Explorer (in case you are using Windows as is the case for this user).</p>

Dami89: <p>Thanks.please guide me on how to remove it manually</p>

ptrblck: <p>I don’t know where you are stuck and think you know how to remove files from your system?<br>
If not, a search for your OS and “how to remove files” should show some tutorials.</p>