20

I have downloaded Anaconda3 for windows 64-bit operating system. After the download and install completed, I opened the Anaconda prompt but it give me this nice error:

'C:\Anaconda3\Scripts\activate.bat' is not recognized as an internal or external command,operable program or batch file.

I just surfed the internet and found a solution to uninstall all previous packages of python but did not work. I have searched for activate.bat file in my system " found it in one folders of anaconda directory " and copy, paste it to the Scripts folder but it gives me errors with conda packages and dependencies. Any solutions please!!
I cannot run any either jupyter notebook or conda as well. Actually, I do not know how to find them in those bunch of Anaconda files and packages.

Thanks in advance,,,.

Maged Saeed
  • 1,784
  • 2
  • 16
  • 35

9 Answers9

25

This is a known Anaconda bug: From their Github:

" I have fixed the underlying bug here but we will not release new Anaconda installers for a while.

The fix is in the latest Miniconda installers:

64-bit: https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe https://repo.continuum.io/miniconda/Miniconda2-latest-Windows-x86_64.exe

32-bit: https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86.exe https://repo.continuum.io/miniconda/Miniconda2-latest-Windows-x86.exe

Install those, then run the Anaconda Prompt and install whatever packages you need. If you want the latest full Anaconda release then use:

conda install anaconda=5.0.1"

Check this github thread for the full answer: https://github.com/conda/conda/issues/6053

Rodolpho Gurgel
  • 361
  • 3
  • 4
  • 8
    Why would people downvote and not leave a comment? Especially on someone that has clearly JUST joined SO to help out? – Robino Feb 08 '18 at 16:57
  • When I open Anaconda Prompt I get: '@CALL "C:\Users\Lucy\Miniconda3\Library\bin\..\..\Scripts\conda.exe" shell.cmd.exe activate activate C:\Users\Lucy\Miniconda3' is not recognized as an internal or external command, operable program or batch file. And conda command doesn't work – LA Hattersley Oct 30 '18 at 13:47
  • If I already have anaconda installed, do I need to uninstall it before installing this miniconda? – Rtucan Nov 11 '18 at 21:23
  • @Robino I don't know but it has happened to me too. I imagine its widespread and whoever is on the business end of the treatment are dismissed regardless. – LeanMan Jan 29 '22 at 18:55
6

When you installing Anaconda3 on Windows 10 and the Anaconda Navigator menu item does not install, and running the Anaconda Prompt gives the activate.bat error.

  1. Delete all instances of the previous python IDEs
  2. Reveal hidden files within the control menu
  3. Go to -> C:\Users[Username] in windows explorer
  4. Delete the files .conda and .anaconda. Possibly others if you had other IDEs.
  5. Go to -> C:\Users[Username]\AppData\Local
  6. Delete all python related files conda, python, ect.. any instances other python IDEs
  7. Go to -> C:\Users[Username]\AppData\Roaming
  8. Delete all python related files conda, python, ect.. any instances other python IDEs
  9. Run the Anaconda installer as Admin and install in a directory such as C:\anaconda3
  10. Sit back and wonder why an install took 4 hours out of my life and start drinking.

At some point I felt like this was a test for the uninitiated... can I start coding now?

  • edit recommentation: I found more Python stuff in C:\Users\[username]\AppData\Local\Programs – Ulu83 Jul 01 '20 at 18:30
  • Thank you so much! I wonder though which of these are necessary? I deleted all .conda files and anaconda folders beofre reading this; didnt work. So is it uninstalling the IDEs? (in my case pycharm and vscode) or is it the installation in C:\ directily or the execution as admin? – TheRibosome Jul 08 '23 at 11:48
3

I think the problem will be solved by clearing all dependencies.
I initially had python installed, 2.7 and 3.6. I just get rid of all of them. The problem is not solved yet.

I discovered that My MySQL server is running. I just closed it but it did not work. I just uninstalled it completely and The problem is solved.
Anaconda needs to listen to , I think 8888 port, which might be used also by MySQL server as well.

I hope this will help.

Maged Saeed
  • 1,784
  • 2
  • 16
  • 35
3

I had the same issue and solved it like this:

  1. Open a command prompt (cmd.exe)
  2. Execute these commands to reset two environment variables:

    set PYTHONPATH= set PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

  3. Start the installer (from within the same command prompt).

  4. Now the installation will succeed!

Tip: if 'Anaconda Prompt' in the start menu isn't working afterwards, use this workaround: C:\Users\<username>\AppData\Local\Continuum\anaconda3\Scripts\activate.bat C:\Users\<username>\AppData\Local\Continuum\anaconda3

Tshilidzi Mudau
  • 7,373
  • 6
  • 36
  • 49
compie
  • 10,135
  • 15
  • 54
  • 78
2

I solved it

If you install other python directories or install anaconda on your drive. remove them all

and visit to C:\Users\<username> and you can find this babies

.anaconda

.conda

Kill them all, reinstall anaconda.

Now it works well.

Community
  • 1
  • 1
sukbu
  • 71
  • 1
  • 3
1

I uninstalled any previous versions.Restarted system and installed Anaconda again at path C:\Users\xyzuser\Anaconda.It is working now

shikha singh
  • 498
  • 1
  • 5
  • 10
1

I solved it with:
0. Rename/delete previous Anaconda3 directory (at c:\ProgramData\Anac...)
 (show/check hidden items at File Manager to delete it)
1. Re-install Anaconda
2. At Advanced Installation Options, I check both:
  2.1. [check] Add Anaconda to my PATH environment variable
  2.2. [check] Register Anaconda as my default Python 3.6
3. then click Install button
4. Done

my OS: windows 10, 64bit

Efdeel
  • 11
  • 2
1

I have met exactly the same problem when I was using anaconda 5.3.1 on windows10.

Well, the solution is to uninstall your anaconda and re-install it. And when you install anaconda, you can't close the exe command window manually which would show up at the end of installing. You should let it run and exit by itself. Only by this way your anaconda would be installed correctly.

0

The Fix is simple. Here's what you need to do. Go to--

C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\Scripts\

*Replace USERNAME with your own***

If you are not able to access this location, then directly search in your C drive for Continuum, and from there you can write the rest of the URL

Search for "Activate.bat" If you are able to find this file, then go to ANACONDA PROMPT and Change your directory by typing:

cd C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\Scripts\

*Replace USERNAME with your own***

Your directory is now projecting to this new location.

Now type:

activate.bat

Hit enter

Now you activated your Anaconda.

Now, you can check if it is working or not by typing

Conda list
soldy
  • 103
  • 1
  • 1
  • 5