4

I've been running Anaconda successfully for a few months on my PC (Win 10) using Git Bash and Anaconda3. However, today I tried to update to the latest version of Anaconda (I don't remember which version but it was xxxx.6 or 8 to xxxx.11). The installation failed (stupid me didn't save the error messages) and after that, I keep started getting this error when I type 'conda xxxxx'.

 CommandNotFoundError: No command 'conda conda'.

However, I am still able to use most conda commands if I called the conda.exe file by giving the full path, with one very unfortunate exception, activating environments.

I've also noticed some other weird behavior. If I reboot my PC, conda works fine, even without calling the full path. I can create a new environment, but as soon as I call source activate or activate or conda activate, it breaks and from then on, any reference to 'conda' gives me CommandNotFoundError: No command 'conda conda'.

There is also some weird behavior in anaconda prompt. Everything seems to work fine. I can create and activate environments with no problem but when I first start the prompt, it says The system cannot find the path specified.

I tried - making sure my PATH was correct - uninstalling and reinstalling for all users, then for just my user - using the 'conda init bash' --> I think this just broke it further. - deleting the registry keys associated with Python - they look good now

I'm at a loss for what to do. I really want to be able to use conda within my git bash again. Any advice is appreciated.

2
  • Thanks to Jason Wang for that official Git repo issue link, an easy solution that worked for me was to go back to an earlier conda version. conda install -n base conda==4.6.7 -- I had to run this in a fresh instance of Git Bash if I had already activated the error in my current shell. I also read that you can do this in Windows shell too (but I didn't try it). Apr 10, 2019 at 16:30
  • I had this issue too superuser.com/questions/1424489/…
    – Patty Jula
    Apr 29, 2019 at 17:16

2 Answers 2

4

This issue has been addressed in conda 4.6.14 as per discussions in the linked Anaconda Github issue #8506

Short version

# while conda command is busted use $CONDA_EXE instead
$CONDA_EXE update conda -y
$CONDA_EXE init
# restart shell

Longer shell outputs

In git bash (2.21.0) Win10:

λ env | grep CONDA
CONDA_SHLVL=0
CONDA_EXE=/c/Users/me/AppData/Local/Continuum/anaconda3/Scripts/conda.exe
CONDA_BAT=C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\conda.bat
_CE_CONDA=conda

λ $CONDA_EXE update conda -y
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: ...working...
.....

λ $CONDA_EXE init
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\conda.exe
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\conda-env.exe
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\conda-script.py
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\conda-env-script.py
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\conda.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\Library\bin\conda.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\_conda_activate.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\rename_tmp.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\conda_auto_activate.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\conda_hook.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\activate.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\activate.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\deactivate.bat
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\activate
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\deactivate
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\etc\profile.d\conda.sh
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\etc\fish\conf.d\conda.fish
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\shell\condabin\Conda.psm1
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\shell\condabin\conda-hook.ps1
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\Lib\site-packages\xonsh\conda.xsh
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\etc\profile.d\conda.csh
modified      C:\Users\me\Documents\WindowsPowerShell\profile.ps1
modified      HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

==> For changes to take effect, close and re-open your current shell. <==


2

I've run into this error too - looking for help. Let me know if you find anything, and I'll link if I find anything else as well!

Edit: on the official Git repo, issue #8506: https://github.com/conda/conda/issues/8506

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .