0

i have a conda environment which i use to run some python scripts. Up until just recently (2-3 days) i could activate it and run my scripts without problem. But now when i run

conda activate WCL

it gives me an error :

Failed to create temp directory "C:\CONDA_~1\2\conda-<RANDOM>\"

Any ideas what to do here ?

Obs : My windows server 2018 user is mirel.voicu without spaces. In theory it should be ok but I think you can reproduce the error by first changing TEMP and TMP variables to C:\conda_tmp to be sure this is done as others suggested and after that create a bat windows file that contains 2 commands: 1. "call conda activate 'some_env' >> output.txt" to dump command output into a log txt file 2. " call conda deactivate" to deactivate the environment. After creating the bat file schedule that bat file to run many many times. I have a bat that performs this operation once a day and after a month or so of running continuosly it finaly gives me the error.

Meanwhile i will try to update conda. I admit i installed my last version around september 2020.

Voicu Mirel
  • 113
  • 6
  • i have to mention that before of this issue i was encountering exactly the same problem as in post : https://stackoverflow.com/questions/60789886/error-failed-to-create-temp-directory-c-users-user-appdata-local-temp-conda and after following those instructions it worked fine for a while . But now shows me again the same issue( for the new Temp variable paths) – Voicu Mirel May 13 '21 at 08:09
  • i restarted conda and now works ( i did the same last time when i changed the TEMP/TMP variables) but is it unpredictable . I don't know for how much time it will work – Voicu Mirel May 13 '21 at 09:12
  • 1
    Anecdotal, but I recall experiencing Conda shell sessions getting stuck in weird states (mismanaged PATH and environment variables) after having a typo in my `conda activate` or `conda deactivate` call. I thought I saw some bug fixes for this about a year back, but there could still be issues in the Windows .bat files. If you can reliably reproduce the error, then you can file a bug and we could possibly propose some workarounds. – merv May 13 '21 at 16:00
  • Had you seen [this answer](https://stackoverflow.com/a/62267251/11301900) in the linked question? – AMC May 14 '21 at 15:14

0 Answers0