How to init shell for conda on Win 10?

Viewed 3132

When I run conda init cmd.exe in either normal or admin mode I get the following error.

WARNING: Cannot install xonsh wrapper without a python interpreter in prefix: C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\Scripts\conda.exe
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\Scripts\conda-env.exe
modified      C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\Scripts\conda-script.py
modified      C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\Scripts\conda-env-script.py
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\condabin\conda.bat
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\Library\bin\conda.bat
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\condabin\_conda_activate.bat
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\condabin\rename_tmp.bat
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\condabin\conda_auto_activate.bat
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\condabin\conda_hook.bat
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\Scripts\activate.bat
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\condabin\activate.bat
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\condabin\deactivate.bat
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\Scripts\activate
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\Scripts\deactivate
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\etc\profile.d\conda.sh
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\etc\fish\conf.d\conda.fish
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\shell\condabin\Conda.psm1
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\shell\condabin\conda-hook.ps1
needs sudo    C:\Users\JASONL~1\AppData\Local\Temp\_MEI202282\etc\profile.d\conda.csh
modified      HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

What does this mean and how do I fix it? Should I just try a fresh install?

4 Answers

Use the anaconda prompt instead of cmd.exe to run the commands.

Run the command in Anaconda PowerShell Prompt.(Start Menu -> Anaconda3 -> Anaconda PowerShell Prompt)

I had the same error. Reinstalling Anaconda fixed the issue (Conda 4.10.1).

I had the same problem.

Running %conda_root_directory%/Library/bin/conda.bat init cmd.exe did the trick. Then I restarted the shell (cmd) and I was able to activate my environment and install a package.

Related