Error access denied

username: Sylvain_Ard
cooked: <p>Hi I have this bug on Windows 10 :<br>
I tried to execute cmd in administrator mode without success :</p>
<pre><code class="lang-auto">(yolact) C:\Users\Sylvain ARD&gt;conda install cudatoolkit=10.0
Collecting package metadata (current_repodata.json): done
Solving environment: done


==&gt; WARNING: A newer version of conda exists. &lt;==
 current version: 4.8.3
 latest version: 4.9.2

Please update conda by running

   $ conda update -n base -c defaults conda



## Package Plan ##

 environment location: C:\Users\Sylvain ARD\.conda\envs\yolact

 added / updated specs:
   - cudatoolkit=10.0


The following NEW packages will be INSTALLED:

 cudatoolkit        conda-forge/win-64::cudatoolkit-10.0.130-h5327add_6


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(698): An error occurred while installing package 'conda-forge::cudatoolkit-10.0.130-h5327add_6'.
Rolling back transaction: done

LinkError: post-link script failed for package conda-forge::cudatoolkit-10.0.130-h5327add_6
location of failed script: C:\Users\Sylvain ARD\.conda\envs\yolact\Scripts\.cudatoolkit-post-link.bat
==&gt; script messages &lt;==
&lt;None&gt;
==&gt; script output &lt;==
stdout:
stderr: Accès refusé.

return code: 1

()


(yolact) C:\Users\Sylvain ARD&gt;
</code></pre>
<p>“accès refusé” means “access denied” in french<br>
thank you for help me<br>
best regards</p>

username: Sylvain_Ard
cooked: <p>I specify that there is a slash before the cudatoolkit-post-link.bat this is a bug of your forum, it delete it</p>

username: Sylvain_Ard
cooked: <p>and before the conda in C:\Users\Sylvain ARD.conda\envs\yolact, please correct this bug !</p>

username: ptrblck
cooked: <p>You can post code snippets by wrapping them into three backticks ```, so I don’t think it’s a bug of the forum.<br>
Please edit your post with the code formatting and it should display the raw output.</p>

username: Sylvain_Ard
cooked: <p>thank you I have done it</p>

username: ptrblck
cooked: <p>Based on the error message I guess you don’t have access rights in <code>C:\Users\Sylvain ARD\.conda\envs\yolact\Scripts</code> in order to execute the file.<br>
I’m not familiar with the rights management of Windows, but maybe you could check the access rights of this folder in the explorer?</p>

username: Sylvain_Ard
cooked: <p>no I have the full rights (execution, reading, writing) in this folder</p>

username: Sylvain_Ard
cooked: <p>I precise that even if I deactivate my antivirus it doesn’t works</p>

username: ptrblck
cooked: <p>Are you able to install any other conda packages?<br>
If not, it seems to be a conda/Windows issue and I would recommend to create an issue in their repository so that the devs can have a look at it.</p>

username: Sylvain_Ard
cooked: <p>yes I can install all, it is the only one</p>

username: Sylvain_Ard
cooked: <p>I unzipped cudatoolkit archive and found .cudatoolkit-post-link.bat<br>
this is its content :</p>
<pre><code class="lang-auto">rem post install EULA message; `pre-link.bat` does not show message and shows warning
echo "By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html" &gt;&gt; %PREFIX%\.messages.txt
</code></pre>
<p>%PREFIX% is not defined so it try to get message.txt from root of the disk and fail with access denied</p>

username: Sylvain_Ard
cooked: <p>I tried to set PREFIX in environment variables, that is the batch file works outside of anaconda without denied access but when I try to install cudatoolkit I have always a denied access, apparently anaconda redefine %PREFIX% for each environment and it is a bad value</p>

username: Sylvain_Ard
cooked: <p>I had finally succeeded by doing :<br>
edit :</p>
<pre><code class="lang-auto"> C:\Users\Sylvain ARD\.conda\pkgs\cudatoolkit-10.0.130-h5327add_6\Scripts\.cudatoolkit-post-link.bat 
</code></pre>
<p>:<br>
and replace :</p>
<pre><code class="lang-auto">rem post install EULA message; `pre-link.bat` does not show message and shows warning
echo "By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html" &gt;&gt; %PREFIX%\.messages.txt
</code></pre>
<p>by :</p>
<pre><code class="lang-auto">rem post install EULA message; `pre-link.bat` does not show message and shows warning
echo "By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html" 
</code></pre>
<p>then do :</p>
<pre><code class="lang-auto">conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
</code></pre>

username: ptrblck
cooked: <p>Good to hear you’ve solved the issue.<br>
Since we are not directly supporting (and testing) the binaries with <code>cudatoolkit=10.0</code>, this might be an issue with these binaries in particular.</p>

username: FelixS90
cooked: <p><a class="mention" href="/u/sylvain_ard">@Sylvain_Ard</a> Might be related to <a href="https://github.com/conda-forge/cudatoolkit-feedstock/issues/51" class="inline-onebox" rel="noopener nofollow ugc">White space in PREFIX path leads to .messages.txt being created in the wrong location · Issue #51 · conda-forge/cudatoolkit-feedstock · GitHub</a>.</p>