2

When I am trying to launch Anaconda prompt it says that

Unable to create process using 'C:\ProgramData\Anaconda3\python.exe C:\ProgramData\Anaconda3\Scripts\conda-script.py shell.cmd.exe activate activate C:\ProgramData\Anaconda3'

From this answer I tried to run C:\ProgramData\Anaconda3\python.exe C:\ProgramData\Anaconda3\Scripts but I got 'C:\ProgramData\Anaconda3\python.exe' is not recognized as an internal or external command, operable program or batch file.

rocker996
  • 113
  • 2
  • 7

2 Answers2

3

Execute the following command in your terminal to activate the conda environment:

C:\Users\YOUR_USERNAME\Anaconda3\Scripts\activate

You need to replace YOUR_USERNAME with your own username. If you have installed conda at some custom-specified location, only then you need to replace the initial part of the command (C:\Users\YOUR_USERNAME\Anaconda3\Scripts) with the path of actual conda installation.

After activating, conda commands would work in the terminal.

codefun
  • 316
  • 2
  • 6
  • D:\temp\anaconda\pkgs\conda-4.10.1-py38haa95532_1\Scripts>activate failed to create process. D:\temp\anaconda\pkgs\conda-4.10.1-py38haa95532_1\Scripts>activate.bat failed to create process. no luck – IulianT Jul 13 '21 at 11:39
  • This script is missing in my installation. Is this a newer version? Is there a different procedure in an older version? – LeanMan Jan 29 '22 at 18:52
1

Start by uninstalling Anaconda from the C:\Users\YOUR_USERNAME\anaconda3 directory then restart your Pc. Now download and install the latest Anaconda distribution only this time when the installer pops up, make sure to select install for all users as shown below:

enter image description here

This should resolve the error without any hitches.

Also note that using JUST ME may not work after you've installed Anaconda since your user name may have a whitespace, i.e C://USERS//USER NAME therefore the shell command that activates conda fails due to the subprocess being unable to reach the breakpoint C://USERS//USER"+" NAME//conda//jupyter.exe