Error : Failed to create temp directory "C:\Users\user\AppData\Local\Temp\conda-<RANDOM>\"

It is due to a bug from conda developers. The bug is the temp path is having names with spaces, so to overcome please reassign the Env Variables TEMP, TMP. (for windows)

  1. go to environment variables
  2. In "User Variables for " section look for TEMP, TMP
  3. double click on TMP and in "variable value", type "C:\conda_tmp"
  4. similarly do it for TEMP
  5. close env variables section
  6. Restart the anaconda prompt, the error should vanish